Ah, actually the documentation begged to differ. Well checking for a zero

numerator is stupid because the math just works, so we'll keep the new behavior
and change the documentation because I'm tired of seeing giant div0 exceptions
in the logs and the fix will no doubt to be to find those places and change
them to display zero if the denominator is zero which is exactly what we're
doing here anyway. It's the new math.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1871 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-07-07 17:11:45 +00:00
parent 3e7523cf0c
commit c3a736890e
@@ -47,7 +47,7 @@ public class DataTool
/**
* Returns the numerator as a percentage of the denominator (100 * num /
* denom), handles 0/0 (returns 0), but will div0 on N/0 where N != 0.
* denom), handles 0/0 (returns 0) and returs 0 when denom is 0.
*/
public int percent (int num, int denom)
{