Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Public static fields | Public Member Functions | Static Public Member Functions | List of all members
Loyc.Math.FPI16 Struct Reference

Fixed-point type based on Int32 with 16 fractional bits More...


Source file:
Inheritance diagram for Loyc.Math.FPI16:

Remarks

Fixed-point type based on Int32 with 16 fractional bits

Public fields

const int Frac = 16
 
const Int32 Unit = 1 << Frac
 
const Int32 MaxInt = Int32.MaxValue >> Frac
 
const Int32 MinInt = Int32.MinValue >> Frac
 
const double MaxDouble = Int32.MaxValue / (double)(1 << Frac)
 
const double MinDouble = Int32.MinValue / (double)(1 << Frac)
 
const Int32 Mask = (1 << Frac) - 1
 
Int32 N
 

Public static fields

static readonly FPI16 Zero = new FPI16()
 
static readonly FPI16 One = new FPI16(1)
 
static readonly FPI16 Epsilon = Prescaled(1)
 
static readonly FPI16 MaxValue = Prescaled(Int32.MaxValue)
 
static readonly FPI16 MinValue = Prescaled(Int32.MinValue)
 

Public Member Functions

 FPI16 (int num)
 
 FPI16 (uint num)
 
 FPI16 (long num)
 
 FPI16 (ulong num)
 
 FPI16 (double num)
 
FPI16 Abs ()
 
FPI16 Floor ()
 
FPI16 Ceiling ()
 
int CountOnes ()
 
int Log2Floor ()
 
FPI16 Sqrt ()
 
FPI16 MulDiv (FPI16 mul, FPI16 div)
 
FPI16 MulShift (FPI16 mul, int shift)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
int CompareTo (FPI16 other)
 
bool Equals (FPI16 other)
 
TypeCode IConvertible. GetTypeCode ()
 
bool ToBoolean (IFormatProvider provider)
 
sbyte ToSByte (IFormatProvider provider)
 
short ToInt16 (IFormatProvider provider)
 
int ToInt32 (IFormatProvider provider)
 
long ToInt64 (IFormatProvider provider)
 
byte ToByte (IFormatProvider provider)
 
ushort ToUInt16 (IFormatProvider provider)
 
uint ToUInt32 (IFormatProvider provider)
 
ulong ToUInt64 (IFormatProvider provider)
 
char ToChar (IFormatProvider provider)
 
double ToDouble (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
decimal ToDecimal (IFormatProvider provider)
 
float ToSingle (IFormatProvider provider)
 
string IConvertible. ToString (IFormatProvider provider)
 
object IConvertible. ToType (Type conversionType, IFormatProvider provider)
 

Static Public Member Functions

static FPI16 Prescaled (Int32 n)
 
static operator FPI16 (int value)
 
static implicit operator FPI16 (short value)
 
static operator FPI16 (uint value)
 
static operator FPI16 (long value)
 
static operator FPI16 (ulong value)
 
static operator FPI16 (float value)
 
static operator FPI16 (double value)
 
static operator int (FPI16 value)
 
static operator long (FPI16 value)
 
static operator uint (FPI16 value)
 
static operator ulong (FPI16 value)
 
static operator float (FPI16 value)
 
static operator double (FPI16 value)
 
static operator FPI8 (FPI16 value)
 
static operator FPI23 (FPI16 value)
 
static operator FPL16 (FPI16 value)
 
static operator FPL32 (FPI16 value)
 
static FPI16 CheckedCast (int num)
 
static FPI16 CheckedCast (uint num)
 
static FPI16 CheckedCast (long num)
 
static FPI16 CheckedCast (ulong num)
 
static FPI16 CheckedCast (double num)
 
static FPI16 FastCast (int num)
 
static FPI16 FastCast (uint num)
 
static FPI16 FastCast (long num)
 
static FPI16 FastCast (double num)
 
static FPI16 operator+ (FPI16 a, Int32 b)
 
static FPI16 operator- (FPI16 a, Int32 b)
 
static FPI16 operator* (FPI16 a, Int32 b)
 
static FPI16 operator/ (FPI16 a, Int32 b)
 
static FPI16 operator% (FPI16 a, Int32 b)
 
static FPI16 operator+ (FPI16 a, FPI16 b)
 
static FPI16 operator- (FPI16 a, FPI16 b)
 
static FPI16 operator- (FPI16 a)
 
static FPI16 operator* (FPI16 a, FPI16 b)
 
static FPI16 operator/ (FPI16 a, FPI16 b)
 
static FPI16 operator% (FPI16 a, FPI16 b)
 
static FPI16 operator<< (FPI16 a, int b)
 
static FPI16 operator>> (FPI16 a, int b)
 
static bool operator== (FPI16 a, FPI16 b)
 
static bool operator!= (FPI16 a, FPI16 b)
 
static bool operator>= (FPI16 a, FPI16 b)
 
static bool operator<= (FPI16 a, FPI16 b)
 
static bool operator> (FPI16 a, FPI16 b)
 
static bool operator< (FPI16 a, FPI16 b)
 
static bool operator== (FPI16 a, Int32 b)
 
static bool operator!= (FPI16 a, Int32 b)
 
static bool operator>= (FPI16 a, Int32 b)
 
static bool operator<= (FPI16 a, Int32 b)
 
static bool operator> (FPI16 a, Int32 b)
 
static bool operator< (FPI16 a, Int32 b)
 
static FPI16 operator& (FPI16 a, FPI16 b)
 
static FPI16 operator| (FPI16 a, FPI16 b)
 
static FPI16 operator^ (FPI16 a, FPI16 b)
 
static FPI16 operator~ (FPI16 a)
 
static FPI16 operator++ (FPI16 a)
 
static FPI16 operator-- (FPI16 a)