Weight.fromTonnes constructor

Weight.fromTonnes(
  1. Rational tonnes
)

Creates a Weight representing the specified number of tonnes.

Implementation

factory Weight.fromTonnes(Rational tonnes) =>
    Weight.fromUnits(WeightUnit.tonne, tonnes);