Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | List of all members
Loyc.Math.IConvertTo< T > Interface Template Reference

Provides methods for converting common numeric types to another numeric type "T". More...


Source file:
Inheritance diagram for Loyc.Math.IConvertTo< T >:
Loyc.Math.IComplexMath< T > Loyc.Math.IMath< T > Loyc.Math.ISignedMath< T > Loyc.Math.IUIntMath< T > Loyc.Math.IIntMath< T > Loyc.Math.IRationalMath< T > Loyc.Math.IFloatMath< T >

Remarks

Provides methods for converting common numeric types to another numeric type "T".

Template Parameters
TA numeric type

Methods for converting type T to standard numeric types would be redundant, because standard numeric types already implement IConvertible for this purpose. To use IConvertible in generic code, add IConvertible as a type constraint on the numeric type.

Public Member Functions

T From (uint t)
 
T From (int t)
 
T From (ulong t)
 
T From (long t)
 
T From (double t)
 
T Clip (uint t)
 
T Clip (int t)
 
T Clip (ulong t)
 
T Clip (long t)
 
T Clip (double t)