Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of <see cref="T:Gu.Units.Density"/>.
 /// </summary>
 /// <param name="value"></param>
 /// <param name="unit"><see cref="T:Gu.Units.KilogramsPerCubicMetre"/>.</param>
 public Density(double value, DensityUnit unit)
 {
     this.kilogramsPerCubicMetre = unit.ToSiUnit(value);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of <see cref="T:Gu.Units.Density"/>.
 /// </summary>
 /// <param name="value"></param>
 /// <param name="unit"></param>
 public static Density From(double value, DensityUnit unit)
 {
     return(new Density(unit.ToSiUnit(value)));
 }