Weight.fromMegatonnes constructor

Weight.fromMegatonnes(
  1. Rational megatonnes
)

Creates a Weight representing the specified number of megatonnes.

Implementation

factory Weight.fromMegatonnes(Rational megatonnes) =>
    Weight.fromUnits(WeightUnit.megatonne, megatonnes);