Helpful numeric types.

Features

1.0.0:

  • Natural Numbers -- arithmetic, Least Common Multiple & Greatest Common Divisor
  • Fractions -- reduction and arithmetic
  • generating ints between (start, end)

Getting started

Built with Dart SDK 3.0.5. No external dependencies. Include it and go.

Usage

final Fraction one = Fraction(6, 8);
final Fraction reduced = one.reduce();
print(reduced);

final NaturalNumber first = NaturalNumber(24);
print(first.divisors());

final NaturalNumber a = NaturalNumber(24);
final NaturalNumber b = NaturalNumber(32);
print(a.gcd(b));
print(b.lcm(a));

final int anInt = between(1, 10);
print(anInt);

Additional information

** This project is generally released to the public under a GPLv3 license. ** Alternate licensing is available on a case-by-case basis, contact nico@visionary.software

Libraries

numnums
Various useful num - esque types for constraining values.