Skip to content

mattspaulding/angular-floating-point

Repository files navigation

angular-floating-point

Pretty floating point calculation results for Angular.

Demo

Take a look at the demo

Installation

Using bower:

$ bower install angular-floating-point --save

Example

angular.module('myApp', ['floatingPoint']).
  controller('myCtrl', function(floatingPoint) {
    
    var uglyResult = 6.1 * 6; //36.599999999999994
    var prettyResult = floatingPoint.makePretty(6.1 * 6); //36.6
  }
);

About

Makes pretty floating point calculations for Angular.

Resources

License

Stars

Watchers

Forks

Packages

No packages published