[go: up one dir, main page]

fracs

fracs library with Fraction and Angle abstracts, compass rose
https://github.com/nanjizal/fracs#fracs

To install, run:

haxelib install fracs 0.0.3-alpha 

See using Haxelib in Haxelib documentation for more information.

README.md

fracs

Fast Decimal to Fraction Approximations for Haxe

( ported from http://www.mindspring.com/~alanh/fracs.html )

Licenced under liberal MIT but the original js version is 'no license' inline code.

Added Pi2pi abstract for easy use of angles, together some interesting use cases.

var p: Pi2pi = '1/2';
var f: Fraction = p;
trace( f + ' pi' ); // 1/2 pi
trace( p.degrees ); // 90
var third: Fraction = 0.333333333333333;
trace( third ); // 1/3

( The code to deal with input string number Exponent is ported, but has been left private, and is not connected or setup for use. Should be easy to implement from commited code. )

Now also provides a compass Rose so you can more easily work with named compass angles.

0.0.3-alpha pre-release

Contributors
Nanjizal
Version
0.0.3-alpha
Published
4 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub