kex docs Standard Library

Units.SI

module Units.SI

meter

meter(value: Number) -> Measure

gram

gram(value: Number) -> Measure

kilogram

kilogram(value: Number) -> Measure

kelvin

kelvin(value: Number) -> Measure

liter

liter(value: Number) -> Measure

newton

newton(value: Number) -> Measure

joule

joule(value: Number) -> Measure

watt

watt(value: Number) -> Measure

volt

volt(value: Number) -> Measure

ampere

ampere(value: Number) -> Measure

ohm

ohm(value: Number) -> Measure

coulomb

coulomb(value: Number) -> Measure

to

to(measure: Measure, _, in: SIPrefix) -> String

mega

mega(measure: Measure) -> Measure

giga

giga(measure: Measure) -> Measure

milli

milli(measure: Measure) -> Measure

micro

micro(measure: Measure) -> Measure

nano

nano(measure: Measure) -> Measure

per

per(measure: Measure, other: Measure) -> Measure

times

times(measure: Measure, other: Measure) -> Measure

type SIUnit

Variants

  • Meter
  • Gram
  • Kilogram
  • Kelvin
  • Liter
  • Newton
  • Joule
  • Watt
  • Volt
  • Ampere
  • Ohm
  • Coulomb

Implements Unit.

Methods

kind Unit

kind(_)

symbol Unit

symbol(_)

*

*(_, _) -> UnitDefinition

type SIPrefix

A display prefix carries the unit it will display, for example Kilo(Watt * Hour).

Variants

  • Kilo(Unit)
  • Mega(Unit)
  • Giga(Unit)
  • Milli(Unit)
  • Micro(Unit)
  • Nano(Unit)

Implements Unit.

Methods

factor Unit

factor(_)

kind Unit

kind(_)

symbol Unit

symbol(_)

extends UnitDefinition

More methods of UnitDefinition, added by this module.

Implements Unit.

extends Measure

More methods of Measure, added by this module.

Prefixes work both on an existing measure (5000.meter.kilo) and at the beginning of a postfix unit expression (3.kilo.watt).

factor

factor : Float

kind

kind : Atom

symbol

symbol : String

kilo

kilo : Measure

*

*(other: Measure) -> Measure

/

/(other: Measure) -> Measure

product

product(other) -> Measure

quotient

quotient(other) -> Measure

productKind

productKind(left, _)

quotientKind

quotientKind(left, _)

productSymbol

productSymbol(_, left, right)

quotientSymbol

quotientSymbol(_, left, right)

extends Integer

More methods of Integer, added by this module.

kilo

kilo : Float

extends Float

More methods of Float, added by this module.

kilo

kilo : Float