gleameter

Types

pub type Unit {
  Unit(
    scale: Float,
    time: Float,
    mass: Float,
    length: Float,
    temperature: Float,
    luminosity: Float,
    current: Float,
    amount: Float,
  )
}

Constructors

  • Unit(
      scale: Float,
      time: Float,
      mass: Float,
      length: Float,
      temperature: Float,
      luminosity: Float,
      current: Float,
      amount: Float,
    )
pub type Value {
  Value(value: Float, unit: Unit)
}

Constructors

  • Value(value: Float, unit: Unit)

Constants

pub const null: Unit

Functions

pub fn amount(from from: Unit, amount amount: Float) -> Unit
pub fn current(from from: Unit, current current: Float) -> Unit
pub fn divide(this lhs: Unit, by rhs: Unit) -> Unit
pub fn inverse(of unit: Unit) -> Unit
pub fn length(from from: Unit, length length: Float) -> Unit
pub fn luminosity(
  from from: Unit,
  luminosity luminosity: Float,
) -> Unit
pub fn mass(from from: Unit, mass mass: Float) -> Unit
pub fn of(value value: Float, unit unit: Unit) -> Value
pub fn scale(from from: Unit, scale scale: Float) -> Unit
pub fn temperature(
  from from: Unit,
  temperature temperature: Float,
) -> Unit
pub fn time(from from: Unit, time time: Float) -> Unit
pub fn times(this lhs: Unit, by rhs: Unit) -> Unit
pub fn unit(
  scale: Float,
  time: Float,
  mass: Float,
  length: Float,
  temperature: Float,
  luminosity: Float,
  current: Float,
  amount: Float,
) -> Unit
Search Document