Abacus
|
32 bit signed Q16.16 number. More...
Public Member Functions | |
override Boolean | Equals (object obj) |
override Int32 | GetHashCode () |
Boolean | Equals (Fixed32 other) |
Boolean | GreaterThan (Fixed32 other) |
Boolean | GreaterThanOrEqualTo (Fixed32 other) |
Boolean | LessThan (Fixed32 other) |
Boolean | LessThanOrEqualTo (Fixed32 other) |
override String | ToString () |
Int32 | ToInt32 () |
Int64 | ToInt64 () |
Single | ToSingle () |
Double | ToDouble () |
Static Public Member Functions | |
static Fixed32 | CreateRaw (Int32 v) |
static Boolean | IsInfinity (Fixed32 f) |
static Boolean | IsNegativeInfinity (Fixed32 f) |
static Boolean | IsPositiveInfinity (Fixed32 f) |
static Boolean | IsNaN (Fixed32 f) |
static Boolean | IsNegative (Fixed32 f) |
static Boolean | TryParse (string s, out Fixed32 r) |
static void | CreateFrom (Int32 v, out Fixed32 r) |
static void | CreateFrom (Int64 v, out Fixed32 r) |
static void | CreateFrom (Single v, out Fixed32 r) |
static void | CreateFrom (Double v, out Fixed32 r) |
static void | Add (ref Fixed32 a, ref Fixed32 b, out Fixed32 r) |
static void | Subtract (ref Fixed32 a, ref Fixed32 b, out Fixed32 r) |
static void | Multiply (ref Fixed32 a, ref Fixed32 b, out Fixed32 r) |
static void | Divide (ref Fixed32 a, ref Fixed32 b, out Fixed32 r) |
static void | Modulo (ref Fixed32 a, ref Fixed32 b, out Fixed32 r) |
static void | Negate (ref Fixed32 f, out Fixed32 r) |
static void | Sqrt (ref Fixed32 f, out Fixed32 r) |
static void | Abs (ref Fixed32 f, out Fixed32 r) |
static void | Sin (ref Fixed32 f, out Fixed32 r) |
static void | Cos (ref Fixed32 f, out Fixed32 r) |
static void | Tan (ref Fixed32 f, out Fixed32 r) |
static void | ArcSin (ref Fixed32 f, out Fixed32 r) |
static void | ArcCos (ref Fixed32 f, out Fixed32 r) |
static void | ArcTan (ref Fixed32 f, out Fixed32 r) |
static void | ArcTan2 (ref Fixed32 y, ref Fixed32 x, out Fixed32 r) |
static void | Saturate (ref Int64 big, out Int32 r) |
static void | SinLookup (ref Fixed32 rad, out Fixed32 r) |
static Fixed32 | Add (Fixed32 a, Fixed32 b) |
static Fixed32 | Subtract (Fixed32 a, Fixed32 b) |
static Fixed32 | Multiply (Fixed32 a, Fixed32 b) |
static Fixed32 | Divide (Fixed32 a, Fixed32 b) |
static Fixed32 | Modulo (Fixed32 a, Fixed32 b) |
static Fixed32 | Negate (Fixed32 f) |
static Fixed32 | operator+ (Fixed32 a, Fixed32 b) |
static Fixed32 | operator- (Fixed32 a, Fixed32 b) |
static Fixed32 | operator* (Fixed32 a, Fixed32 b) |
static Fixed32 | operator/ (Fixed32 a, Fixed32 b) |
static Fixed32 | operator% (Fixed32 a, Fixed32 b) |
static Fixed32 | operator- (Fixed32 f) |
static Fixed32 | operator+ (Fixed32 f) |
static Fixed32 | Sqrt (Fixed32 f) |
static Fixed32 | Abs (Fixed32 f) |
static Fixed32 | Sin (Fixed32 f) |
static Fixed32 | Cos (Fixed32 f) |
static Fixed32 | Tan (Fixed32 f) |
static Fixed32 | ArcSin (Fixed32 f) |
static Fixed32 | ArcCos (Fixed32 f) |
static Fixed32 | ArcTan (Fixed32 f) |
static Fixed32 | ArcTan2 (Fixed32 y, Fixed32 x) |
static Boolean | operator== (Fixed32 a, Fixed32 b) |
static Boolean | operator!= (Fixed32 a, Fixed32 b) |
static Boolean | operator>= (Fixed32 a, Fixed32 b) |
static Boolean | operator<= (Fixed32 a, Fixed32 b) |
static Boolean | operator> (Fixed32 a, Fixed32 b) |
static Boolean | operator< (Fixed32 a, Fixed32 b) |
static | operator Int32 (Fixed32 f) |
static | operator Int64 (Fixed32 f) |
static | operator Single (Fixed32 f) |
static | operator Double (Fixed32 f) |
static implicit | operator Fixed32 (Int32 v) |
static implicit | operator Fixed32 (Int64 v) |
static implicit | operator Fixed32 (Single v) |
static implicit | operator Fixed32 (Double v) |
static Fixed32 | CreateFrom (Int32 v) |
static Fixed32 | CreateFrom (Int64 v) |
static Fixed32 | CreateFrom (Single v) |
static Fixed32 | CreateFrom (Double v) |
Public Attributes | |
const Byte | S = 1 |
const Byte | M = 15 |
const Byte | N = 16 |
Int32 | numerator |
const Int32 | denominator = (Int32) 1 << N |
Static Public Attributes | |
static readonly Fixed32 | Epsilon = CreateRaw (10) |
static readonly Fixed32 | Resolution = CreateRaw (1) |
static readonly Fixed32 | MaxValue = CreateRaw (Int32.MaxValue) |
static readonly Fixed32 | MinValue = CreateRaw (Int32.MinValue) |
static readonly Int32 | k = 1 << (N - 1) |
static readonly Double | invdd = 1.0 / (Double) denominator |
static readonly Single | invds = 1.0f / (Single) denominator |
static readonly Int64 | big_k = (Int64) k |
static readonly Int64 | bigMin = (Int64) Int32.MinValue |
static readonly Int64 | bigMax = (Int64) Int32.MaxValue |
static readonly Int32[] | sinLUT |
Properties | |
Int32 | Numerator [get, set] |
Int32 | Denominator [get] |
Int32 | High [get] |
Int32 | Low [get] |
32 bit signed Q16.16 number.
|
static |