Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
This is a class which exposes static methods for various common math functions. Currently, the methods simply wrap the methods of the System.Math class (with the exception of a few added extras). This is in case the implementation needs to be swapped out with a faster C++ implementation, if deemed that the System.Math methods are not up to far speed wise.

Namespace: Visual3D
Assembly: Visual3D (in Visual3D.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
public static class MathUtil
<ExtensionAttribute> _
Public NotInheritable Class MathUtil

Members

         
 All Members  Fields   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Abs(Single)
Returns the absolute value of the supplied number.
AbsGreater(Single, Single)
ACos(Single)
Returns the arc cosine of the angle.
AngleBetween(Vector2, Vector2)
Signed angle between two vectors, in radians. Therefore, does not use "Dot", which would yield the same answer if the two vectors were switched. If accumulate this around a closed shape, can determine whether "winding" is clockwise or counter-clockwise.
AreEquivalent(Double, Double)
AreEquivalent(Object, Object)
AreEquivalent(Single, Single)
ArithmeticMean(array<Single>[]()[][])
ArithmeticMean(Single*, Int32)
ASin(Single)
Returns the arc sine of the angle.
AssertIsFinite(Single)
AsVector2(Vector3)
AsVector2XZ(Vector3)
Return X and Z. When Height is in Y!
Average(Vector2, Vector2)
Average(Vector3, Vector3)
Average(Double, Double)
Average(Single, Single)
Bezier(Vector3, Vector3, Vector3, Single)
Calculate a Vector3 position along a Bezier Curve
BuildReflectionMatrix(Plane)
Builds a reflection matrix for the specified plane.
CalculateBasicFaceNormal(Vector3, Vector3, Vector3)
Calculate a face normal from 3 points, providing no w-information.
CalculateFaceNormal(Vector3, Vector3, Vector3)
Calculate a face normal from 3 points on a plane. Result includes the w component which is the offset from the origin.
CalculateTangentSpaceVector(Vector3, Vector3, Vector3, Single, Single, Single, Single, Single, Single)
Calculates the tangent space vector for a given set of positions / texture coords.
CeilingDiv(Int32, Int32)
Division, rounding fractional part up. ASSERT: "result * divisor >= value"; "(result - 1) * divisor lt value". Use this when dividing into equal parts, and is better to be slightly larger than slightly smaller.
CeilingToMultiple(Int32, Int32)
Like Ceiling, but to multiple of StepSize value (e.g. "Ceiling 131 to multiple of 5" == 135).
CeilingToMultiple(Single, Single)
Like Ceiling, but to multiple of StepSize value (e.g. "Ceiling 131 to multiple of 5" == 135).
Clamp(Double, Double, Double)
Clamp(Int32, Int32, Int32)
Clamp(Single, Single, Single)
ClampAbsoluteMin(Single, Single)
ClampChange(Double, Double, Double)
Return value is based on proposedValue, but maxChange limits how much the result can differ from oldValue. (maxChange should not be negative.)
ClampChange(Single, Single, Single)
Return value is based on proposedValue, but maxChange limits how much the result can differ from oldValue. (maxChange should not be negative.)
ClampMagnitude(Double, Double)
ClampMagnitude(Single, Single)
Clamp "Abs(val)" to "absMax".
ClampMinimum(Double, Double)
Do not allow to be below "min". (Intent clearer than using "Math.Max()".)
ClampMinimum(Int32, Int32)
Do not allow to be below "min". (Intent clearer than using "Math.Max()".)
ClampMinimum(Single, Single)
Do not allow to be below "min". (Intent clearer than using "Math.Max()".)
ClampToBoundary(Vector3%, BoundingBox%)
Clamps the point to the defined Boundary Box. Returns 'true' is clamping action was required, else 'false' if point was already inside the bounds.
ComparisonBasedOn<(Of <<'(T>)>>)(Function<(Of <<'(T, Double>)>>))
Constrain(Point, Rectangle)
Modifies a point to ensure it remains within a specified Rectangle
Constrain(Point, Rectangle)
Modifies a point to ensure it remains within a specified Rectangle
Constrain(Double, Double, Double)
Modifies a value to ensure it remains between a specified minimum and maximum value.
Constrain(Int32, Int32, Int32)
Modifies a value to ensure it remains between a specified minimum and maximum value.
Constrain(Single, Single, Single)
Modifies a value to ensure it remains between a specified minimum and maximum value.
Constrain<(Of <<'(ValueType>)>>)(ValueType, ValueType, ValueType)
Modifies a value to ensure it remains between a specified minimum and maximum value.
Constrain(Point, Int32, Int32, Int32, Int32)
Modifies a point to ensure it remains within a rectangle specified as x, y, width and height.
ConstrainNormalized(Double)
Modifies a value to ensure it remains between -1 and 1.
ConstrainNormalized(Single)
Modifies a value to ensure it remains between -1 and 1.
ConstrainNormalizedPositive(Double)
Modifies a value to ensure it remains between 0 and 1.
ConstrainNormalizedPositive(Single)
Modifies a value to ensure it remains between 0 and 1.
ConstrainPercent(Double)
Modifies a value to ensure it remains between -100 and 100.
ConstrainPercent(Int32)
Modifies a value to ensure it remains between -100 and 100.
ConstrainPercent(Single)
Modifies a value to ensure it remains between -100 and 100.
ConstrainPositivePercent(Double)
Modifies a value to ensure it remains between 0 and 100.
ConstrainPositivePercent(Int32)
Modifies a value to ensure it remains between 0 and 100.
ConstrainPositivePercent(Single)
Modifies a value to ensure it remains between 0 and 100.
Cos(Single)
Returns the cosine of the angle.
DebugAssertIsFinite(Single)
DefaultIfNull<(Of <<'(T>)>>)(Nullable<(Of <<'(T>)>>), T)
DefaultIfNull<(Of <<'(T>)>>)(T, T)
Degrees180
Degrees360
Degrees90
DegreesPerRadian
DegreesPerRotation
DegreesToRadians(Single)
Converts degrees to radians.
DiminishMagnitude(Single, Single)
Diminish magnitude of "value" by "absChange". "absChange" is expected to be >= 0. If Abs(value) lt absChange, result is 0. Otherwise, is moved towards 0.
DirectionFromOrientation(Quaternion)
Distance(Double, Double)
Distance(Single, Single)
1-D equivalent of Distance for Vector2, Vector3.
DivRound(Int32, Int32)
Integer divide, returning nearest integer. (Built-in division does truncation.)
EmptyBoundingBox
EmptyBoundingSphere
EnsureNearFarValid(Single%, Single%, String, ErrorHandling)
Epsilon
EpsilonForOne
EpsilonForOneF
Equals(Matrix%, Matrix%)
Equals(Object, Object, Object)
True if all 3 params are equal.
EquivalenceMethods
FastAtan(Single)
Returns the arctan of argument.
FastInvSqrt(Single)
Returns the inverse square root of a number.
FastSinCos(Single, Single%, Single%)
Returns the sine and cosine of the angle.
FastTan(Single)
Fast floating point Tangent.
FloatEqual(Single, Single)
FloatEqual(Single, Single, Single)
Compares float values for equality, taking into consideration that floating point values should never be directly compared using ==. 2 floats could be conceptually equal, but vary by a .000001 which would fail in a direct comparison. To circumvent that, a tolerance value is used to see if the difference between the 2 floats is less than the desired amount of accuracy.
FloatEqualTolerent(Single, Single)
FloatToInt32Bits(Single)
FloatToUInt32Bits(Single)
FloorToMultiple(Single, Single)
Like Floor, but to multiple of StepSize value (e.g. "Floor 134 to multiple of 5" == 130).
FromVector2XZ(Vector2)
Y (height) initialized to zero. Presumably, caller will fill in later, using GetHeightAt().
GeometricMean(array<Single>[]()[][])
GeometricMean(Single*, Int32)
GetBottomCenter(BoundingBox)
Gets the bottom center point of this bounding box.
GetBottomCenter(BoundingBox%)
Gets the bottom center point of this bounding box.
GetBoundingRadius(BoundingBox)
GetBoundingRadius(BoundingBox%)
GetBoundingRadiusSquared(BoundingBox)
GetBoundingRadiusSquared(BoundingBox%)
GetBoxCenterWithVerticalOffset(BoundingBox, Single)
GetBoxCenterWithVerticalOffset(BoundingBox%, Single)
Gets the center point of this bounding box with an offset
GetCenter(BoundingBox)
Gets the center point of this bounding box.
GetExponentMantissa(Double, Int32%, Int64%)
GetExponentMantissa(Single, Int32%, Int32%)
GetExponentMantissaAligned(Double, Int32%, Int64%)
GetExponentMantissaAligned(Single, Int32%, Int32%)
GetHeight(BoundingBox)
Get's the Y-Dimension (aka "height") of the bounding box.
GetHeight(BoundingBox%)
Get's the Y-Dimension (aka "height") of the bounding box.
GetMaxDimension(Vector3)
GetMaxValue(array<Single>[]()[][])
GetMaxValue(Single*, Int32)
GetMinMaxValues(array<Single>[]()[][], Single%, Single%)
GetMinMaxValues(Single*, Int32, Single%, Single%)
GetMinValue(array<Single>[]()[][])
GetMinValue(Single*, Int32)
GetPrime(Int32)
GetSize(BoundingBox)
GetSize(BoundingBox%)
GetTopCenter(BoundingBox)
Gets the top center point of this bounding box.
GetTopCenter(BoundingBox%)
Gets the top center point of this bounding box.
GetTypeCount(VertexElementFormat)
Utility method which returns the count of scalar values in a given type of vertex element.
GetTypeSize(VertexElementFormat)
Returns size of given vertex element format in bytes.
HarmonicMean(array<Single>[]()[][])
HarmonicMean(Single*, Int32)
HarmonicMeanBalanced(array<Single>[]()[][])
HarmonicMeanBalanced(Single*, Int32)
IdentityMatrix
ilog2(UInt32)
Integer logarithm of modulo 2.
IncrementToMax(Int32%, Int32, Int32)
InfiniteBoundingBox
InfiniteBoundingSphere
Infinity
Int32BitsToFloat(Int32)
Interpolate(Single, Single, Single, Single, Single, Boolean, Single%)
IntersectTwoLines(Vector2, Vector2, Vector2, Vector2, Vector2%, Single%, Single%)
IntersectTwoLinesXY(Vector3, Vector3, Vector3, Vector3, Vector2%, Single%, Single%)
Project lines to XY-Plane; find intersection.
IntersectTwoLinesXZ(Vector3, Vector3, Vector3, Vector3, Vector2%, Single%, Single%)
Project lines to XZ-Plane; find intersection.
InvalidBoundingBox
InvSqrt(Single)
Inverse square root.
IsEven(Int32)
IsFinite(Single)
Returns true if the value is not +/- infinity and not NaN
IsIdentity(Matrix)
IsIdentity(Matrix%)
IsNonnegativeFinite(Single)
Returns 'true' if the value is zero or higher, but not Infinity nor NaN.
IsNotFinite(Single)
Returns true if the value is positive or negative infinity or NaN
IsPositiveFinite(Single)
Returns true if the value > 0, but not Infinity nor NaN.
IsPrime(Int32)
IsSizeInvalid(BoundingBox%)
Indicates if the size of this Box is invalid. "true" if any dimension is negative, infinity or not a number (NaN). Previous version returned "true" if ANY dimension was zero. TMS 31-Aug-2010: Changed to be "true" if has no thickness, but !IsZero. Reason: May still be visible, so wish to include when merging.
IsZero(BoundingBox%)
Indicates if the size and position of the box are zero (Min=Max={0,0,0}).
IsZero(Matrix)
IsZero(Matrix%)
IsZeroSized(BoundingBox%)
Indicates if the size of this Box is Zero (i.e. Min == Max).
Lerp(Byte, Byte, Single)
Weighted Average of two numbers. When wgt==0, returns a, when wgt==1, returns b.
Lerp(array<Byte>[]()[][], array<Byte>[]()[][], Single)
SIDE-EFFECT: dstData becomes result. Each dst element receives Lerp(dst, src, wgtSrc). To be meaningful, dstData and srcData must have identical stride. REQUIRE srcData.Length == dstData.Length.
Lerp(Double, Double, Double)
Weighted Average of two numbers. When wgt==0, returns a, when wgt==1, returns b.
Lerp(Single, Single, Single)
Weighted Average of two numbers. When wgt==0, returns a, when wgt==1, returns b. NOTE: Identical to XNA MathHelper.Lerp.
Lerp(array<Byte>[]()[][], array<Byte>[]()[][], array<Byte>[]()[][], Single)
SIDE-EFFECT: dstData becomes result. Each dst element receives Lerp(src1, src2, wgtSrc2). To be meaningful, src1Data, src2Data, and dstData must have identical stride. REQUIRE src1Data.Length == src2Data.Length == dstData.Length. ALLOW dstData may be same array as src1Data or src2Data.
Lerp(Buffer<(Of <<'(Byte>)>>), Buffer<(Of <<'(Byte>)>>), Buffer<(Of <<'(Byte>)>>), Single)
SIDE-EFFECT: dst becomes result. Each dst element receives Lerp(src1, src2, wgtSrc2). To be meaningful, src1, src2, and dst must have identical stride. REQUIRE src1.Count == src2.Count == dst.Count. ALLOW dst may be same buffer as src1 or src2.
Lerp(array<Byte>[]()[][], Int32, array<Byte>[]()[][], array<Byte>[]()[][], Single)
SIDE-EFFECT: dstData becomes result. Each dst element receives Lerp(src1, src2, wgtSrc2). To be meaningful, src1Data, src2Data, and dstData must have identical stride. REQUIRE src1Data.Length == src2Data.Length == dstData.Length. ALLOW dstData may be same array as src1Data or src2Data.
Lerp(Single, Single, Single, Single, Single)
LerpWithRange(Single, Single, Single, Single, Single, Single)
MakeTransform(Spatial)
MakeTransform(Vector3, Vector3, Quaternion)
Builds a Matrix4 from orientation / scale / position.
MakeTransform(Vector3%, Vector3%, Matrix%)
Builds a Matrix4 from orientation / scale / position.
MakeTransform(Vector3%, Vector3%, Quaternion%)
Builds a Matrix4 from orientation / scale / position.
MakeTransform(Nullable<(Of <<'(Vector3>)>>), Nullable<(Of <<'(Vector3>)>>), Nullable<(Of <<'(Quaternion>)>>))
MakeTransform(Vector3%, Vector3%, Quaternion%, Matrix%)
MatrixDecompose(Matrix, Vector3%, Vector3%, Matrix%, Quaternion%)
TMS: Alternative to XNA's Matrix.Decompose. In case we stop using XNA. Source: Book "XNA Essentials", chapter 16 (on CD). Fixed trans bugs; added "orient" output. TODO: "Y" comes out negated compared to XNA.
Max(array<Single>[]()[][])
Max(Vector2, Vector2)
Max(Int32, Int32)
Used to quickly determine the greater value between two values.
Max(Int32%, Int32)
Max(Single, Single)
Used to quickly determine the greater value between two values.
Max(Single%, Single)
Used to quickly determine the greater value between two values.
Max(Int32, Int32, Int32)
Max(Single, Single, Single)
Used to quickly determine the greater value amoung three values.
Max(Int32, Int32, Int32, Int32)
MaxFloatBelowOne
Using Float Precision, closest value that can be achieved just below 1 (equals: 0.99999994f).
Merge(BoundingBox, BoundingBox)
Return a BoundingBox which contains both box1 and box2, excluding any box with an invalid size (any dimension is 0, negative, or infinite).
Merge(BoundingBox%, BoundingBox)
Expands the result BoundingBox, if needed, to ensure that it contains additionToContain. Result is expanded only if additionToContain has a valid non-zero size (size in all dimensions is positive, non-zero, non-infinite value), or else set to additionToContain if it has valid size and result does not.
Merge(BoundingBox%, BoundingBox%)
Expands the result BoundingBox, if needed, to ensure that it contains additionToContain. Result is expanded only if additionToContain has a valid non-zero size (size in all dimensions is positive, non-zero, non-infinite value), or else set to additionToContain if it has valid size and result does not.
Merge(BoundingBox%, Vector3%)
Millimeter
Min(array<Single>[]()[][])
Min(Vector2, Vector2)
Min(Int32, Int32)
Used to quickly determine the lesser value between two values.
Min(Int32%, Int32)
Min(Single, Single)
Used to quickly determine the greater value between two values.
Min(Single%, Single)
Min(Int32, Int32, Int32)
Min(Single, Single, Single)
Used to quickly determine the greater value amoung three values.
MinMax(array<Vector2>[]()[][])
Useful for finding bounds of group of points. minVec contains (independent) minimum of each coord; similar for maxVec.
Multiply(Matrix%, Matrix%)
MultiplyTypeCount(VertexElementFormat, Int32)
Returns proper enum for vertex element format multiplied by a value.
MultiplyUnsafe(Matrix%, Matrix%, Matrix%)
This is unsafe but more efficient alternative to Matrix.Multiply(ref, ref, out) because the out result parameter cannot be the same as the inputs.
MultiplyUnsafe(Matrix%, Matrix%, Matrix%, Matrix%)
NearAboveOne
NearlyEqual(Matrix, Matrix)
NearlyEqual(Quaternion, Quaternion)
NearlyEqual(Vector2, Vector2)
NearlyEqual(Vector3, Vector3)
NearlyEqual(Vector4, Vector4)
NearlyEqual(Double, Double)
Since only one value each, For numbers near zero, treat as absolute scale, rather than ratio.
NearlyEquals(Single, Single)
CAUTION: Only meaningful for target in range (-1,1). Otherwise, needs a tolerance that scales with the value.
NearlyEquals(Double, Double, Double)
NearlyEquals(Int32, Int32, Int32)
NearlyEquals(Single, Single, Single)
CAUTION: Uses an absolute tolerance, not a scaled error term, so be careful, when values might be large, that tolerance is large enough to be distinguishable within a float value. E.g. "NearZero" is only meaningful tolerance for values in range (-1, 1).
NearlyEquals2(Double, Double)
More appropriate test (than NearlyEquals) for numbers that might exceed range [-1,1].
NearlyEquals2(Single, Single)
More appropriate test (than NearlyEquals) for numbers that might exceed range [-1,1].
NearNegativeOne
NearNegativeZero
NearOne
NearZero
NearZeroDegrees
NearZeroRadians
NearZeroRotations
nlz(UInt32)
Count of the leading zero bit.
NullIfDefault<(Of <<'(T>)>>)(T, T)
NullIfDefaultRef<(Of <<'(T>)>>)(T, T)
OneDegreeArcLength(Single)
Pi
pop(UInt32)
Count of the amount of 1-bit.
PositiveDivRound(Int32, Int32)
Integer divide, returning nearest integer. REQUIRE positive number, divisor. (Built-in division does truncation.)
RadiansPerDegree
RadiansPerRotation
RadiansToDegrees(Single)
Converts radians to degrees.
RandomFloat(Single)
Similar to built-in Random(int), but for floats. Returns float from 0 up to (but never quite reaching) limit.
RandomFloat(Single, Random)
RandomInteger(Int32, Int32)
RandomRange(Single, Single)
Returns a random value between the specified min and max values.
RandomRange(Single, Single, Random)
RandomSeedValueReset(Int32)
RandomSymmetricUnitValue()()()()
RandomUnitValue()()()()
RandomUnitValue(Random)
ReplaceVector2XZ(Vector3%, Vector2)
RootMeanSquare(array<Single>[]()[][])
RootMeanSquare(Single*, Int32)
RotationsPerDegree
RotationsPerRadian
Round(Double)
Round(Single)
Round(Double, Int32)
Round, keeping specified number of fractional digits.
Round(Single, Int32)
Round1(Double)
Round, keeping one fractional digit.
Round2(Double)
Round, keeping two fractional digits.
Round3(Double)
Round, keeping three fractional digits.
RoundDownToPowerOfTwo(Int32)
RoundedCeiling(Double)
Ceiling, but in case number might be slightly high due to rounding errors, subtract a tiny amount first. For situations where don't want to unnecessarily go to next larger value. The opposite of "SafeCeiling". EX: Math.Ceiling(16.000000000000002) => 17, but RoundedCeiling => 16. NOTE: MathUtil.NearZero~=0.00000006. If 16.00000005 => 16 is an excessive rounding for you, then make a version that accepts a tolerance parameter, in place of hard-wired "NearZero". Conversely, "float" calculations might want 10x or 100x NearZero, to overcome accumulated losses. NOTE: If number is from calculations involving large numbers, do careful testing to be sure this never produces a smaller answer than desired. (Concept: we are very close to an integer value, but slightly off due to approximate math. If it would be "expensive" or "misleading" to return a larger answer, we wish to avoid doing so if possible. If we had used exact math, we would have gotten exactly 16. However, this belief needs to be verified by testing.)
RoundedFloor(Double)
Floor, but in case number might be slightly low due to rounding errors, add a tiny amount first. For situations where don't want to unnecessarily go to next small value. EX: Math.Floor(15.999999999999998) => 15, but RoundedFloor => 16. NOTE: MathUtil.NearZero~=0.00000006. If 15.99999995 => 16 is an excessive rounding for you, then make a version that accepts a tolerance parameter, in place of hard-wired "NearZero". NOTE: If number is from calculations involving large numbers, do careful testing to be sure this never produces a larger answer than desired. (Concept: we are very close to an integer value, but slightly off due to approximate math. If it would be "expensive" or "misleading" to return a smaller answer, we wish to avoid doing so if possible. If we had used exact math, we would have gotten exactly 16. However, this belief needs to be verified by testing.)
RoundToMultiple(Single, Single)
Rounds Number to nearest multiple of StepSize value (e.g. "Round 134 to the nearest 5" == 135).
RoundUpToPowerOfTwo(Int32)
Rounds up to nearest power of two, if x is not already one, or returns 0 if x is 0 or negative.
SafeCeiling(Double)
Conservative calculation that makes SURE you have a safely large answer. Even if this means unnecessarily increasing the result. The opposite of "RoundedCeiling". Ceiling, but in case number might be slightly low due to rounding errors, add a tiny amount first. EX: Math.Ceiling(15.999999999999998) => 16, but SafeCeiling => 17. (Concept: "this close" to 16, given approximate math, we aren't SURE 16 is high enough to be safe. Maybe exact math would have resulted in a number slightly above 16. If we need to be sure we have an "upper bound", we increase to 17.)
SafeFloor(Double)
Conservative calculation that makes SURE you have a safely small answer. Even if this means unnecessarily decreasing the result. The opposite of "RoundedFloor". Ceiling, but in case number might be slightly high due to rounding errors, subtract a tiny amount first. EX: Math.Floor(16.000000000000002) => 16, but SafeFloor => 15. (Concept: "this close" to 16, given approximate math, we aren't SURE 16 is low enough to be safe. Maybe exact math would have resulted in a number slightly below 16. If we need an ironclad guarantee of "lower bound", then we drop to 15.)
Scale(BoundingBox%, Scalar)
ScaledByNonZero(Double, Double)
Returns value * multiplier, if multiplier != 0, otherwise returns value.
ScaledByNonZero(Single, Single)
Returns value * multiplier, if multiplier != 0, otherwise returns value.
ScaledByPositive(Double, Double)
Returns value * multiplier, if multiplier > 0, otherwise returns value.
ScaledByPositive(Single, Single)
Returns value * multiplier, if multiplier > 0, otherwise returns value.
ScaleExponentially(Single, Single)
Method calculates the value using Exponential-type accelerations, producing higher magnitudes for quicker changes in value.
SetIfNotNull<(Of <<'(T>)>>)(T%, Nullable<(Of <<'(T>)>>))
SetIfNotNull<(Of <<'(T>)>>)(T%, T)
SetToIdentity(Matrix%)
Sin(Single)
Returns the sine of the angle.
SmallDistance
Sqrt(Single)
Returns the square root of a number.
SqrtOneHalf
Swap<(Of <<'(T>)>>)(T%, T%)
Tan(Single)
Returns the tangent of the angle.
TolerablyNearZero
For situations (such as matrix compose/decompose) where errors may be significantly larger than last bit.
Transform(Matrix, BoundingBox)
Transforms all of the corners of this Box by the Matrix, causing it to become the new Box which encompasses the rotated version of itself.
Transform(Matrix%, BoundingBox%)
Transforms all of the corners of this Box by the Matrix, causing it to become the new Box which encompasses the rotated version of itself.
TruncateTowardsNegativeInfinity(Double)
Differs from Math.Truncate when number is negative. E.g. "-0.1" returns "-1" instead of "0" ("towards negative infinity" instead of "towards zero".)
TruncateValueString(Single)
TwoPi
UInt32BitsToFloat(UInt32)
VerySmall
WgtFromResult(Double, Double, Double)
Calculate wgt that would return result, if did Lerp(a, b, wgt). That is, where result is, w.r.t. a and b. less 0 is before a, greater 1 is after b.
WrapValue(Double, Double, Double)
Clamps given value into allowed range, by adding or subtracting (upperBound-lowerBound) from the value depending on whether or not value fits into the range.
WrapValue(Single, Single, Single)
Clamps given value into allowed range, by adding or subtracting (upperBound-lowerBound) from the value depending on whether or not value fits into the range.

Inheritance Hierarchy

System..::..Object
  Visual3D..::..MathUtil

See Also