Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A starting point for measurement units in Dart

License

NotificationsYou must be signed in to change notification settings

yeradis/units.dart

Repository files navigation

A starting point for measurement units in Dart.

Included right now:

  • Speed

    • Meter per secondm/s
    • Kilometer per hourkm/h
    • Mile per hourmi/h
    • Knotkn
  • Length

    • Meterm
    • Kilometerkm
    • Milemi
  • Angle

    • Degree°
    • Radianrad
    • Gradiangrad

    Supports negative angles, not restricted to 360 degrees or 2PI radians

  • Temperature

    • Celsius°C
    • Fahrenheit°F
    • KelvinK
    • Rankine°R
    • Romer°Rø

Usage

A simple usage example:

    import'package:units/units.dart';main() {var speed=newSpeed.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

About

A starting point for measurement units in Dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp