OmegaEngine API
1.0.3
|
Designed to keep other code clean of messy spaghetti code required for some math operations. More...
Static Public Member Functions | |
static decimal | Clamp (this decimal value, decimal min=0, decimal max=1) |
Makes a value stay within a certain range More... | |
static double | Clamp (this double value, double min=0, double max=1) |
Makes a value stay within a certain range More... | |
static float | Clamp (this float value, float min=0, float max=1) |
Makes a value stay within a certain range More... | |
static int | Clamp (this int value, int min=0, int max=1) |
Makes a value stay within a certain range More... | |
static double | Modulo (this double dividend, double divisor) |
Calculates a modulus (always positive). More... | |
static float | Modulo (this float dividend, float divisor) |
Calculates a modulus (always positive). More... | |
static int | Modulo (this int dividend, int divisor) |
Calculates a modulus (always positive). More... | |
static float | DegreeToRadian (this float value) |
Converts an angle in degrees to radians More... | |
static double | DegreeToRadian (this double value) |
Converts an angle in degrees to radians More... | |
static float | RadianToDegree (this float value) |
Converts an angle in radians to degrees More... | |
static double | RadianToDegree (this double value) |
Converts an angle in radians to degrees More... | |
static Vector3 | UnitVector (double inclination, double azimuth) |
Calculates a unit vector using spherical coordinates. More... | |
static byte | AngleToByte (this double angle) |
Maps a 0�-180� angle in radians to a 0-255 byte value. More... | |
static double | ByteToAngle (this byte b) |
Maps a 0-255 byte value to a 0�-180� angle in radians. More... | |
static Vector4 | ByteToAngle (this ByteVector4 vector) |
Maps a vector of 0-255 byte values to a vector of 0�-180� angles in radians. More... | |
static double | InterpolateTrigonometric (double factor, [NotNull] params double[] values) |
Performs smooth (trigonometric) interpolation between two or more values More... | |
static float | InterpolateTrigonometric (this float factor, [NotNull] params float[] values) |
Performs smooth (trigonometric) interpolation between two or more values More... | |
static Vector4 | InterpolateTrigonometric (float factor, [NotNull] params Vector4[] values) |
Performs smooth (trigonometric) interpolation between two or more values More... | |
static double | Factorial (int n) |
Calculates the factorial of n (n!) More... | |
static double | BinomCoeff (int n, int k) |
Calculates the binomial coefficient (n choose k) More... | |
static Vector2 [] | Bezier (int resolution, [NotNull] params Vector2[] controlPoints) |
Calculates points on a 2D bezier curve More... | |
static DoubleVector3 [] | Bezier (int resolution, [NotNull] params DoubleVector3[] controlPoints) |
Calculates points on a 3D bezier curve More... | |
static double [] | GaussKernel (double sigma, int kernelSize) |
Generates a Gaussian kernel. More... | |
static short | LoWord (uint l) |
static short | LoWord (int l) |
static short | HiWord (uint l) |
static short | HiWord (int l) |
static int | HiByte (byte b) |
static int | LoByte (byte b) |
static byte | CombineHiLoByte (int high, int low) |
static Quaternion | ViewQuaternion (this Vector3 view, float roll) |
Calculates a rotation quaternion for a view vector More... | |
static Vector2 | Rotate (this Vector2 value, float rotation) |
Rotates a Vector2 by rotation around the origin. More... | |
static BoundingBox | Transform (this BoundingBox box, Matrix matrix) |
Applies a matrix transform to a bounding box. More... | |
static BoundingSphere | Transform (this BoundingSphere sphere, Matrix matrix) |
Applies a matrix transform to a bounding sphere. More... | |
Designed to keep other code clean of messy spaghetti code required for some math operations.
|
static |
Maps a 0�-180� angle in radians to a 0-255 byte value.
|
inlinestatic |
Calculates points on a 2D bezier curve
controlPoints | An array of control points; the curve will pass through the first and the last entry |
resolution | The desired number of output points |
|
inlinestatic |
Calculates points on a 3D bezier curve
resolution | The desired number of output points |
controlPoints | An array of control points; the curve will pass through the first and the last entry |
|
inlinestatic |
Calculates the binomial coefficient (n choose k)
n | A value between 0 and 32768 |
k | An integer |
|
static |
Maps a 0-255 byte value to a 0�-180� angle in radians.
|
static |
Maps a vector of 0-255 byte values to a vector of 0�-180� angles in radians.
|
inlinestatic |
Makes a value stay within a certain range
value | The number to clamp |
min | The minimum number to return |
max | The maximum number to return |
|
inlinestatic |
Makes a value stay within a certain range
value | The number to clamp |
min | The minimum number to return |
max | The maximum number to return |
|
inlinestatic |
Makes a value stay within a certain range
value | The number to clamp |
min | The minimum number to return |
max | The maximum number to return |
|
inlinestatic |
Makes a value stay within a certain range
value | The number to clamp |
min | The minimum number to return |
max | The maximum number to return |
|
static |
Converts an angle in degrees to radians
value | The angle in degrees |
|
static |
Converts an angle in degrees to radians
value | The angle in degrees |
|
inlinestatic |
Calculates the factorial of n (n!)
n | A value between 0 and 32768 |
Values between n=0 and n=16 have been pre-calculated and are therefor very fast
|
inlinestatic |
Generates a Gaussian kernel.
sigma | The standard deviation of the Gaussian distribution. |
kernelSize | The size of the kernel. Should be an uneven number. |
|
inlinestatic |
Performs smooth (trigonometric) interpolation between two or more values
factor | A factor between 0 and values .Length |
values | The value checkpoints |
|
inlinestatic |
Performs smooth (trigonometric) interpolation between two or more values
factor | A factor between 0 and values .Length |
values | The value checkpoints |
|
inlinestatic |
Performs smooth (trigonometric) interpolation between two or more values
factor | A factor between 0 and values .Length |
values | The value checkpoints |
|
inlinestatic |
Calculates a modulus (always positive).
|
inlinestatic |
Calculates a modulus (always positive).
|
inlinestatic |
Calculates a modulus (always positive).
|
static |
Converts an angle in radians to degrees
value | The angle in radians |
|
static |
Converts an angle in radians to degrees
value | The angle in radians |
|
inlinestatic |
Rotates a Vector2 by rotation around the origin.
value | The original vector. |
rotation | The angle to rotate by in degrees. |
|
inlinestatic |
Applies a matrix transform to a bounding box.
box | The bounding box to apply the transform to. |
matrix | The transformation matrix to apply. |
|
inlinestatic |
Applies a matrix transform to a bounding sphere.
sphere | The bounding sphere to apply the transform to. |
matrix | The transformation matrix to apply. |
|
static |
Calculates a unit vector using spherical coordinates.
inclination | Angle away from positive Z axis in radians. Values from 0 to Pi. |
azimuth | Angle away from from positive X axis in radians. Values from 0 to 2*Pi. |
|
static |
Calculates a rotation quaternion for a view vector
view | The view vector |
roll | The roll value |