coulomb

package coulomb

Type members

Classlikes

Defines DeltaQuantity constructors and extension methods

Defines DeltaQuantity constructors and extension methods

object Quantity

Defines Quantity constructors and extension methods

Defines Quantity constructors and extension methods

Types

final type *[L, R]

Represents the product of two unit expressions

Represents the product of two unit expressions

Type parameters:
L

the left-hand unit subexpression

R

the right-hand unit subexpression

type AcreFoot = (Acre * Foot)
final type /[L, R]

Represents unit division

Represents unit division

Type parameters:
L

the left-hand unit subexpression (numerator)

R

the right-hand unit subexpression (denominator)

type MPS = (Meter / Second)
opaque type DeltaQuantity[V, U, B]

Represents a value with an associated unit type and "delta" offset, for example coulomb.units.temperature.Temperature or coulomb.units.time.EpochTime

Represents a value with an associated unit type and "delta" offset, for example coulomb.units.temperature.Temperature or coulomb.units.time.EpochTime

Type parameters:
B

base unit type (the base unit of U)

U

the unit type

V

the raw value type

opaque type Quantity[V, U]

Represents a value with an associated unit type

Represents a value with an associated unit type

Type parameters:
U

the unit type

V

the raw value type

final type ^[B, E]

Represents raising unit expression B to rational power E

Represents raising unit expression B to rational power E

Type parameters:
B

a base unit expression

E

a rational exponent

type V = (Meter ^ 3)
type H = (Second ^ -1)
type R = (Meter ^ (1 / 2))

Deprecated types

@deprecated("Unitless should be replaced by integer literal type \'1\'")
final type Unitless = 1
Deprecated

Value members

Concrete methods

inline def coefficient[U1, U2]: Rational

Obtain the coefficient of conversion from U1 -> U2 If U1 and U2 are not convertible, causes a compilation failure.

Obtain the coefficient of conversion from U1 -> U2 If U1 and U2 are not convertible, causes a compilation failure.

inline def showUnit[U]: String

obtain a string representation of a unit type, using unit abbreviation forms

obtain a string representation of a unit type, using unit abbreviation forms

Type parameters:
U

the unit type

Returns:

the unit in string form

showUnit[Meter / Second] // => "m/s"
inline def showUnitFull[U]: String

obtain a string representation of a unit type, using full unit names

obtain a string representation of a unit type, using full unit names

Type parameters:
U

the unit type

Returns:

the unit in string form

showUnitFull[Meter / Second] // => "meter/second"