coulomb.syntax
package coulomb.syntax
Extensions
Extensions
extension [V](v: V)
Lift a raw value into a delta-unit quantity
Lift a raw value into a delta-unit quantity
- Type parameters:
- B
base unit to anchor with
- U
the desired unit type
- Returns:
a DeltaQuantity with given value and unit type
val date = (1.0).withDeltaUnit[Day, Second]
- Source:
- deltaquantity.scala
extension [V](v: V)
Lift a raw value into a unit quantity
Lift a raw value into a unit quantity
- Type parameters:
- U
the desired unit type
- Returns:
a Quantity with given value and unit type
val distance = (1.0).withUnit[Meter]
- Source:
- quantity.scala