Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

triallax/quantities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Dart package that helps you work with physical quantities and units seamlessly.

Created from templates made available by Stagehand under a BSD-style license.

Installation

See installation instructions here.

API Status

The API is highly experimental; large changes are planned. Do NOT use this package in production code unless you understand and accept the consequences of this.

Usage

import 'package:quantities/quantities.dart';

void main() {
  final height = 165(centi(meter));
  final weight = 53(kilo(gram));
  final bmi = weight / (height * height);
  print('${bmi.to(kilo(gram) / squareMeter)} kg / m^2');
}

Credits

This package takes huge inspiration from purescript-quantites, especially in its internal design. Kudos to sharkdp!

About

Work with physical quantities and units seamlessly! (moved to https://codeberg.org/triallax/quantities)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages