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.FPI8 Struct Reference

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


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

Remarks

Fixed-point type based on Int32 with 8 fractional bits

Public fields

const int Frac = 8
 
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 FPI8 Zero = new FPI8()
 
static readonly FPI8 One = new FPI8(1)
 
static readonly FPI8 Epsilon = Prescaled(1)
 
static readonly FPI8 MaxValue = Prescaled(Int32.MaxValue)
 
static readonly FPI8 MinValue = Prescaled(Int32.MinValue)
 

Public Member Functions

 FPI8 (int num)
 
 FPI8 (uint num)
 
 FPI8 (long num)
 
 FPI8 (ulong num)
 
 FPI8 (double num)
 
FPI8 Abs ()
 
FPI8 Floor ()
 
FPI8 Ceiling ()
 
int CountOnes ()
 
int Log2Floor ()
 
FPI8 Sqrt ()
 
FPI8 MulDiv (FPI8 mul, FPI8 div)
 
FPI8 MulShift (FPI8 mul, int shift)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
int CompareTo (FPI8 other)
 
bool Equals (FPI8 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 FPI8 Prescaled (Int32 n)
 
static operator FPI8 (int value)
 
static implicit operator FPI8 (short value)
 
static operator FPI8 (uint value)
 
static operator FPI8 (long value)
 
static operator FPI8 (ulong value)
 
static operator FPI8 (float value)
 
static operator FPI8 (double value)
 
static operator int (FPI8 value)
 
static operator long (FPI8 value)
 
static operator uint (FPI8 value)
 
static operator ulong (FPI8 value)
 
static operator float (FPI8 value)
 
static operator double (FPI8 value)
 
static operator FPI16 (FPI8 value)
 
static operator FPI23 (FPI8 value)
 
static operator FPL16 (FPI8 value)
 
static operator FPL32 (FPI8 value)
 
static FPI8 CheckedCast (int num)
 
static FPI8 CheckedCast (uint num)
 
static FPI8 CheckedCast (long num)
 
static FPI8 CheckedCast (ulong num)
 
static FPI8 CheckedCast (double num)
 
static FPI8 FastCast (int num)
 
static FPI8 FastCast (uint num)
 
static FPI8 FastCast (long num)
 
static FPI8 FastCast (double num)
 
static FPI8 operator+ (FPI8 a, Int32 b)
 
static FPI8 operator- (FPI8 a, Int32 b)
 
static FPI8 operator* (FPI8 a, Int32 b)
 
static FPI8 operator/ (FPI8 a, Int32 b)
 
static FPI8 operator% (FPI8 a, Int32 b)
 
static FPI8 operator+ (FPI8 a, FPI8 b)
 
static FPI8 operator- (FPI8 a, FPI8 b)
 
static FPI8 operator- (FPI8 a)
 
static FPI8 operator* (FPI8 a, FPI8 b)
 
static FPI8 operator/ (FPI8 a, FPI8 b)
 
static FPI8 operator% (FPI8 a, FPI8 b)
 
static FPI8 operator<< (FPI8 a, int b)
 
static FPI8 operator>> (FPI8 a, int b)
 
static bool operator== (FPI8 a, FPI8 b)
 
static bool operator!= (FPI8 a, FPI8 b)
 
static bool operator>= (FPI8 a, FPI8 b)
 
static bool operator<= (FPI8 a, FPI8 b)
 
static bool operator> (FPI8 a, FPI8 b)
 
static bool operator< (FPI8 a, FPI8 b)
 
static bool operator== (FPI8 a, Int32 b)
 
static bool operator!= (FPI8 a, Int32 b)
 
static bool operator>= (FPI8 a, Int32 b)
 
static bool operator<= (FPI8 a, Int32 b)
 
static bool operator> (FPI8 a, Int32 b)
 
static bool operator< (FPI8 a, Int32 b)
 
static FPI8 operator& (FPI8 a, FPI8 b)
 
static FPI8 operator| (FPI8 a, FPI8 b)
 
static FPI8 operator^ (FPI8 a, FPI8 b)
 
static FPI8 operator~ (FPI8 a)
 
static FPI8 operator++ (FPI8 a)
 
static FPI8 operator-- (FPI8 a)