Defines a 1-dimensional affine space using given unit and starting at given zero point.
Defines a unit of measure identified by given type-level string.
A two-way conversion between affine spaces with different underlying units.
A two-way conversion between affine spaces with different underlying units.
scale
is the conversion between the units.
vector
is the distance between the zeroes of the space B and scaled space A.
Instances of this class should be implicit.
A two-way conversion between affine spaces with the same underlying units.
A two-way conversion between affine spaces with the same underlying units.
vector
is the distance between the zeroes of the spaces.
Instances of this class should be implicit.
A two-way conversion between affine spaces with different underlying units.
A two-way conversion between affine spaces with different underlying units.
scale
is the conversion between the units.
vector
is the distance between the zeroes of the space B and scaled space A.
Instances of this class should be implicit.
A two-way linears conversion between affine spaces.
A two-way linears conversion between affine spaces.
a1
and b1
are the same value on different scales.
a2
and b2
are the same value on different scales.
Requires a1 != a2
and b1 != b2
Instances of this class should be implicit.
A two-way conversion between affine spaces with the same underlying units.
A two-way conversion between affine spaces with the same underlying units.
vector
is the distance between the zeroes of the spaces.
Instances of this class should be implicit.
angström sign (Å)
dollar sign ($)
dong sign (₫)
euro sign (€)
ohm sign (Ω)
pound sign (£)
rupee sign (₨)
yen sign (¥)
commercial at sign (@)
a synonym for angular second sign _sec (ʺ)
degree sign (°)
digit 1 (₅)
center dot (·)
e with acute accent (é)
epsilon (ε)
a synonym for angular minute sign _min (ʹ)
a synonym for angular second sign _sec (ʺ)
lowercase L with stroke (ł)
left parenthesis
angular minute sign (ʹ)
micro sign (µ)
percent sign (%)
full stop / period (.)
permille sign (‰)
a synonym for angular minute sign _min (ʹ)
right parenthesis
angular second sign (ʺ)
space
subscript zero (₀₅)
subscript two (₂)
subscript three (₃)
subscript four (₄)
subscript five (₅)
subscript e (₅)
subscript h (₅)
subscript m (₅)
subscript n (₅)
subscript p (₅)
subscript s (₅)
subscript t (₅)
String constructor.
String constructor. Separate type-level characters with ~:
to create a type-level string.
Creates a one-way affine space converter.
Creates a one-way affine space converter. You should store it in an implicit val.
Creates a one-way integer affine space converter.
Creates a one-way integer affine space converter. You should store it in an implicit val.
Creates a two-way affine space converter, based on one points defined in two affine spaces.
Creates a two-way affine space converter, based on one points defined in two affine spaces. The affine spaces should have the same base unit. This defines a translation – a conversion that simply shifts values by a constant displacement. You should store it in an implicit val.
Creates a two-way affine space converter, based on two points x and y defined in two affine spaces.
Creates a two-way affine space converter, based on two points x and y defined in two affine spaces. You should store it in an implicit val.
Helper for defining unit ratios.
Helper for defining unit ratios. Syntax: one[kilometre].contains(1000)[metre]
Package containing helper types and methods for defining new units and ratios between units.
It also contains a set of type-level characters, used for defining type-level unit identifiers.
Usage:
import io.github.karols.units.defining._