Permalink
Browse files

Remove Breeze's modf. Apparently % in JS is floating point.

  • Loading branch information...
1 parent facaefc commit 7ba398e0805f2bb919aa8a17b9066344ecf21252 @jverkoey committed Feb 27, 2010
Showing with 0 additions and 18 deletions.
  1. +0 −18 dev/math/namespace.math.js
View
@@ -28,21 +28,3 @@ Breeze.Math = {};
Breeze.Math.chopRemainder = function(x) {
return parseInt(x, 10);
};
-
-
-/**
- * Calculate the floating point modulus of x by y.
- * Note: This function isn't incredibly accurate.
- *
- * @param {number} x
- * @param {number} y
- * @return {number} x % y (floating point)
- */
-Breeze.Math.modf = function(x, y) {
- var quotient = x / y;
- var remainder = (quotient - Breeze.Math.chopRemainder(quotient)) * y;
- if (remainder < 0) {
- remainder += y;
- }
- return remainder;
-};

0 comments on commit 7ba398e

Please sign in to comment.