Weight.fromMilligrams constructor

Weight.fromMilligrams(
  1. Rational milligrams
)

Creates a Weight representing the specified number of milligrams.

Implementation

factory Weight.fromMilligrams(Rational milligrams) =>
    Weight.fromUnits(WeightUnit.milligram, milligrams);