|
static int | Sign (FP value) |
| Returns a number indicating the sign of a Fix64 number. Returns 1 if the value is positive, 0 if is 0, and -1 if it is negative. More...
|
|
static FP | Abs (FP value) |
| Returns the absolute value of a Fix64 number. Note: Abs(Fix64.MinValue) == Fix64.MaxValue. More...
|
|
static FP | FastAbs (FP value) |
| Returns the absolute value of a Fix64 number. FastAbs(Fix64.MinValue) is undefined. More...
|
|
static FP | Floor (FP value) |
| Returns the largest integer less than or equal to the specified number. More...
|
|
static FP | Ceiling (FP value) |
| Returns the smallest integral value that is greater than or equal to the specified number. More...
|
|
static FP | Round (FP value) |
| Rounds a value to the nearest integral value. If the value is halfway between an even and an uneven value, returns the even value. More...
|
|
static FP | operator+ (FP x, FP y) |
| Adds x and y. Performs saturating addition, i.e. in case of overflow, rounds to MinValue or MaxValue depending on sign of operands. More...
|
|
static FP | FastAdd (FP x, FP y) |
| Adds x and y witout performing overflow checking. Should be inlined by the CLR. More...
|
|
static FP | operator- (FP x, FP y) |
| Subtracts y from x. Performs saturating substraction, i.e. in case of overflow, rounds to MinValue or MaxValue depending on sign of operands. More...
|
|
static FP | FastSub (FP x, FP y) |
| Subtracts y from x witout performing overflow checking. Should be inlined by the CLR. More...
|
|
static long | AddOverflowHelper (long x, long y, ref bool overflow) |
|
static FP | operator* (FP x, FP y) |
|
static FP | FastMul (FP x, FP y) |
| Performs multiplication without checking for overflow. Useful for performance-critical code where the values are guaranteed not to cause overflow More...
|
|
static int | CountLeadingZeroes (ulong x) |
|
static FP | operator/ (FP x, FP y) |
|
static FP | operator% (FP x, FP y) |
|
static FP | FastMod (FP x, FP y) |
| Performs modulo as fast as possible; throws if x == MinValue and y == -1. Use the operator (%) for a more reliable but slower modulo. More...
|
|
static FP | operator- (FP x) |
|
static bool | operator== (FP x, FP y) |
|
static bool | operator!= (FP x, FP y) |
|
static bool | operator> (FP x, FP y) |
|
static bool | operator< (FP x, FP y) |
|
static bool | operator>= (FP x, FP y) |
|
static bool | operator<= (FP x, FP y) |
|
static FP | Sqrt (FP x) |
| Returns the square root of a specified number. More...
|
|
static FP | Sin (FP x) |
| Returns the Sine of x. This function has about 9 decimals of accuracy for small values of x. It may lose accuracy as the value of x grows. Performance: about 25% slower than Math.Sin() in x64, and 200% slower in x86. More...
|
|
static FP | FastSin (FP x) |
| Returns a rough approximation of the Sine of x. This is at least 3 times faster than Sin() on x86 and slightly faster than Math.Sin(), however its accuracy is limited to 4-5 decimals, for small enough values of x. More...
|
|
static long | ClampSinValue (long angle, out bool flipHorizontal, out bool flipVertical) |
|
static FP | Cos (FP x) |
| Returns the cosine of x. See Sin() for more details. More...
|
|
static FP | FastCos (FP x) |
| Returns a rough approximation of the cosine of x. See FastSin for more details. More...
|
|
static FP | Tan (FP x) |
| Returns the tangent of x. More...
|
|
static FP | Atan (FP y) |
|
static FP | Atan2 (FP y, FP x) |
|
static FP | Asin (FP value) |
|
static FP | Acos (FP value) |
|
static implicit | operator FP (long value) |
|
static | operator long (FP value) |
|
static implicit | operator FP (float value) |
|
static | operator float (FP value) |
|
static implicit | operator FP (double value) |
|
static | operator double (FP value) |
|
static | operator FP (decimal value) |
|
static implicit | operator FP (int value) |
|
static | operator decimal (FP value) |
|
static float | ToFloat (FP value) |
|
static int | ToInt (FP value) |
|
static FP | FromFloat (float value) |
|
static bool | IsInfinity (FP value) |
|
static bool | IsNaN (FP value) |
|
static FP | FromRaw (long rawValue) |
|
|
static readonly decimal | Precision = (decimal)(new FP(1L)) |
|
static readonly FP | MaxValue = new FP(MAX_VALUE-1) |
|
static readonly FP | MinValue = new FP(MIN_VALUE+2) |
|
static readonly FP | One = new FP(ONE) |
|
static readonly FP | Ten = new FP(TEN) |
|
static readonly FP | Half = new FP(HALF) |
|
static readonly FP | Zero = new FP() |
|
static readonly FP | PositiveInfinity = new FP(MAX_VALUE) |
|
static readonly FP | NegativeInfinity = new FP(MIN_VALUE+1) |
|
static readonly FP | NaN = new FP(MIN_VALUE) |
|
static readonly FP | EN1 = FP.One / 10 |
|
static readonly FP | EN2 = FP.One / 100 |
|
static readonly FP | EN3 = FP.One / 1000 |
|
static readonly FP | EN4 = FP.One / 10000 |
|
static readonly FP | EN5 = FP.One / 100000 |
|
static readonly FP | EN6 = FP.One / 1000000 |
|
static readonly FP | EN7 = FP.One / 10000000 |
|
static readonly FP | EN8 = FP.One / 100000000 |
|
static readonly FP | Epsilon = FP.EN3 |
|
static readonly FP | Pi = new FP(PI) |
| The value of Pi More...
|
|
static readonly FP | PiOver2 = new FP(PI_OVER_2) |
|
static readonly FP | PiTimes2 = new FP(PI_TIMES_2) |
|
static readonly FP | PiInv = (FP)0.3183098861837906715377675267M |
|
static readonly FP | PiOver2Inv = (FP)0.6366197723675813430755350535M |
|
static readonly FP | Deg2Rad = Pi / new FP(180) |
|
static readonly FP | Rad2Deg = new FP(180) / Pi |
|
static readonly FP | LutInterval = (FP)(LUT_SIZE - 1) / PiOver2 |
|
Represents a Q31.32 fixed-point number.
Definition at line 11 of file Fix64.cs.