Just a question:
Why was the dice function written as it is?
Would the following suffice and be faster (no loop)?
int dice(int num, int size)
{
if (num <= 0 || size <= 0)
return (0);
return (number(num, num * size));
}
I was just wondering that if the above function is faster (maybe not much faster) but faster, why not use it instead?
Advantages:
No declaration and initialization of any variables.
No loops.
Disadvantages:
??? Don't know any... ???
Mythran
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
| Newbie List: http://groups.yahoo.com/group/circle-newbies/ |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT