units 0.0.5 copy "units: ^0.0.5" to clipboard
units: ^0.0.5 copied to clipboard

outdatedDart 1 only

A starting point for measurement units in Dart.

Units Pub Travis status Coverage Status #

A starting point for measurement units in Dart.

Included right now:

  • Speed
  • Length
  • Angle Supports negative angles, not restricted to 360 degrees or 2PI radians
  • Temperature ... works with: Celsius, Fahrenheit, Kelvin, Rankine and Romer

Usage #

A simple usage example:

    import 'package:units/units.dart';

    main() {
        var speed = new Speed.fromKilometerPerHour(value: 360.0);
        print('360 km/h are ${speed.inMeterPerSecond} m/s');
        print('360 km/h are ${speed.inMeterPerSecond} mi/h');
    }

Note: All numbers are forced to a max representation with exactly 6 significant digits.

For example: 12345678910.12345678 will turn into: 12345678910.123457

0
likes
0
pub points
21%
popularity

Publisher

verified publisheryeradis.com

A starting point for measurement units in Dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on units