예제 #1
0
 public static Fahrenheit From(ILevel <double> q)
 {
     if (q.Scale.Family != Fahrenheit.Family)
     {
         throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" to \"Fahrenheit\".", q.GetType().Name));
     }
     return(new Fahrenheit(DegFahrenheit.From(q.NormalizedLevel) + Fahrenheit.Offset));
 }
예제 #2
0
 public override IQuantity <double> From(IQuantity <double> quantity)
 {
     return(DegFahrenheit.From(quantity));
 }