src/miscallenous.cpp

changeset 1065
c8ecddbd99e9
parent 1062
4119185b56ca
child 1066
d7ec12688716
--- a/src/miscallenous.cpp	Sat Jan 28 14:13:01 2017 +0200
+++ b/src/miscallenous.cpp	Sat Jan 28 14:14:28 2017 +0200
@@ -61,7 +61,7 @@
 void roundToDecimals (double& a, int decimals)
 {
 	static const double factors[] = { 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9 };
-	if (decimals >= 0 and decimals < length (factors))
+	if (decimals >= 0 and decimals < countof(factors))
 		a = round (a * factors[decimals]) / factors[decimals];
 }
 

mercurial