Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 698 Bytes

units.md

File metadata and controls

43 lines (32 loc) · 698 Bytes

Units

The two main functions for working with units are uparse and u_str:

@u_str
uparse

Available units

The base SI units are as follows. You can either use the @u_str macro like 1.5u"m", or simply import these explicitly from the package with using DynamicQuantities: m.

Units.m
Units.kg
Units.s
Units.A
Units.K
Units.cd
Units.mol

Derived units

Several derived SI units are available as well:

Modules = [Units]
Order = [:constant]
Filter = t -> t ∉ (Units.m, Units.kg, Units.s, Units.A, Units.K, Units.cd, Units.mol)

Custom Units

You can define custom units with the @register_unit macro:

@register_unit