Пример #1
0
        /// <summary>Explicit cast unit types</summary>
        public static Unit <U> Cast <U, T>(Unit <T> x)
            where T : struct, IComparable
            where U : struct, IComparable
        {
            var u = Operators <U, T> .Cast(x.Value);

            return(new Unit <U>(u, x.UnitId));
        }
Пример #2
0
 /// <summary>Cast from type U to type T</summary>
 public static T Cast <U>(U a) => Operators <T, U> .Cast(a);