Index
Modules:
constants
,
units
,
utils
.
API symbols
`$`:
units: macro `$`[T: SomeUnit](s: T): string
`*=`:
units: proc `*=`[T: SomeUnit](x: var T; y: UnitLess)
`*`:
units: macro `*`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`+=`:
units: proc `+=`[T: SomeUnit](x: var T; y: T)
`+`:
units: macro `+`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`-=`:
units: proc `-=`[T: SomeUnit](x: var T; y: T)
`-`:
units: proc `-`[T: SomeUnit](x: T): T
units: macro `-`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`.`:
units: macro `.`[T: SomeUnit | SomeNumber](x: T; y: untyped): untyped
`/=`:
units: proc `/=`[T: SomeUnit](x: var T; y: UnitLess)
`/`:
units: macro `/`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`<=`:
units: macro `<=`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`<`:
units: macro `<`[T: SomeUnit | SomeNumber; U: SomeUnit | SomeNumber](x: T; y: U): untyped
`==`:
units: macro `==`[T: SomeUnit; U: SomeUnit](x: T; y: U): bool
`^`:
utils: macro `^`(x: typed; num: static int): untyped
abs:
units: proc abs[T: SomeUnit](t: T): T
almostEqual:
utils: proc almostEqual(a, b: FloatType; epsilon = 10 ^ -8): bool
c:
constants: const c
defUnit:
units: macro defUnit(arg: untyped; toExport: bool = false): untyped
e:
constants: const e
G_Newton:
constants: const G_Newton
hash:
units: proc hash[T: SomeUnit](x: T): Hash
hp:
constants: const hp
hp_bar:
constants: const hp_bar
k_B:
constants: const k_B
m_e:
constants: const m_e
m_e_c2:
constants: const m_e_c2
M_u:
constants: const M_u
m_u:
constants: const m_u
m_μ:
constants: const m_μ
m_μ_eV:
constants: const m_μ_eV
N_A:
constants: const N_A
pretty:
units: macro pretty[T: SomeUnit](s: T; precision: int; short: bool; format = ffDefault): untyped
prettyImpl:
units: proc prettyImpl(s: FloatType; typStr: string; precision: int; short: bool; format: FloatFormatMode): string
quantityOf:
units: macro quantityOf[T: SomeUnit](x: T): untyped
r_e:
constants: const r_e
SomeUnit:
units: type SomeUnit
sqrt:
units: macro sqrt[T: SomeUnit](t: T): untyped
to:
units: macro to[T: SomeUnit; U: SomeUnit](x: T; to: typedesc[U]): U
toBaseUnits:
units: macro toBaseUnits[T: SomeUnit](x: T): untyped
toDef:
units: macro toDef[T: SomeUnit](x: T; to: untyped): untyped
toFloat:
units: proc toFloat[T: SomeUnit](x: T): FloatType
toNaturalUnit:
units: macro toNaturalUnit[T: SomeUnit](t: T): untyped
toRawFloat:
units: converter toRawFloat(x: UnitLess): FloatType
toUnitLess:
units: converter toUnitLess(x: float32): UnitLess
units: converter toUnitLess(x: float64): UnitLess
units: converter toUnitLess(x: SomeNumber): UnitLess
unitOf:
units: macro unitOf[T: SomeUnit](s: T): untyped
ε_0:
constants: const ε_0
π:
constants: const π