コード例 #1
0
        public static Rankine From(IQuantity <double> q)
        {
            Scale <double> scale = Catalog.Scale(Rankine.Family, q.Unit);

            if (scale == null)
            {
                throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" to \"Rankine\".", q.GetType().Name));
            }
            return(Rankine.From(scale.Create(q.Value)));
        }
コード例 #2
0
 public override ILevel <double> From(IQuantity <double> quantity)
 {
     return(Rankine.From(quantity));
 }
コード例 #3
0
 public int /* IComparable<Rankine> */ CompareTo(Rankine other)
 {
     return(this.m_level.CompareTo(other.m_level));
 }
コード例 #4
0
 public override ILevel <double> From(ILevel <double> level)
 {
     return(Rankine.From(level));
 }
コード例 #5
0
 public bool /* IEquatable<Rankine> */ Equals(Rankine other)
 {
     return(this.m_level == other.m_level);
 }