Author: adrian.chadd
Date: Wed Jul 8 15:39:26 2009
New Revision: 14161
Modified:
branches/LUSCA_HEAD/libcore/tools.c
branches/LUSCA_HEAD/libcore/tools.h
Log:
Convert the uint64_float() function to return double.
Modified: branches/LUSCA_HEAD/libcore/tools.c
==============================================================================
--- branches/LUSCA_HEAD/libcore/tools.c (original)
+++ branches/LUSCA_HEAD/libcore/tools.c Wed Jul 8 15:39:26 2009
@@ -149,8 +149,8 @@
return b ? (100.0 * a / b) : 0.0;
}
-uint64_t
+double
uint64_percent(uint64_t a, uint64_t b)
{
- return b ? ((uint64_t) (100.0 * a / b + 0.5)) : 0;
+ return (double) b ? ((double) (100.0 * (double) a / (double) b +
0.5)) : 0.0;
}
Modified: branches/LUSCA_HEAD/libcore/tools.h
==============================================================================
--- branches/LUSCA_HEAD/libcore/tools.h (original)
+++ branches/LUSCA_HEAD/libcore/tools.h Wed Jul 8 15:39:26 2009
@@ -96,6 +96,6 @@
extern int percent(int, int);
extern double dpercent(double, double);
-extern uint64_t uint64_percent(uint64_t, uint64_t);
+extern double uint64_percent(uint64_t, uint64_t);
#endif
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---