Пример #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="T:Gu.Units.Length"/>.
 /// </summary>
 /// <param name="value"></param>
 /// <param name="unit"><see cref="T:Gu.Units.Metres"/>.</param>
 public Length(double value, LengthUnit unit)
 {
     this.metres = unit.ToSiUnit(value);
 }
Пример #2
0
 /// <summary>
 /// Creates a new instance of <see cref="T:Gu.Units.Length"/>.
 /// </summary>
 /// <param name="value"></param>
 /// <param name="unit"></param>
 public static Length From(double value, LengthUnit unit)
 {
     return(new Length(unit.ToSiUnit(value)));
 }