﻿ MathUtils Class
Tesla Graphics Engine Documentation (January 2012)
MathUtils Class
TeslaTesla.MathMathUtils
Utility class that contains math constants and useful math functions. Declaration Syntax
 C#
`public static class MathUtils` Members
 All Members Methods Fields Public Protected Instance Static Declared Inherited
Icon Member Description  Ceil(Single)
Returns the ceiling, the smallest integer greater than or equal to the source value.  Clamp(Single, Single, Single)
Clamps a value within the specified range.  ClampAndRound(Single, Single, Single)
Clamps and rounds a value within the specified range.  ClampToByte(Int32)
Clamps an integer to the byte range 0-255.  DegreesToRadians
Value to multiply degrees by to obtain radians.  Distance(Single, Single)
Computes the absolute value between a and b.  E
Represents the math constant e.  Epsilon
Represents a "close to zero" value, the smallest float value possible.  Floor(Single)
Returns the floor, the largest integer less than or equal to the source value.  FuzzyEquals(Single, Single)
Checks if the values a and b are just "nearly" equal, to account for floating-point error. This is abs(a - b) is less than float.Epsilon.  Lerp(Single, Single, Single)
Linearly interpolates between two values.  Log10E
Represents the math constant log base ten of e.  Log2E
Represents the log base two of e.  Max(Single, Single)
Finds the maximum value of two supplied values.  Min(Single, Single)
Finds the minimum value of two supplied values.  NearEpsilon(Single, Single)
Checks if the values a and b are within float.Epsilon  OneThird
One third constant.  Pi
Represents the value of pi (180 degrees).  PiOver2
Represents Pi/2 (90 degrees).  PiOver4
Represents Pi/4 (45 degrees).  PiSquared
Represents Pi^2  RadiansToDegrees
Value to multiply radians by to obtain degrees.  SmoothStep(Single, Single, Single)
Interpolates between two values using a cubic equation.  Sqrt(Single)
Returns the Square root of the value.  ThreePiOver4
Represents 3Pi/4 (135 degrees).  ToDegrees(Single)
Converts an angle in radians to the corresponding angle in degrees.  ToRadians(Single)
Converts an angle in degrees to the corresponding angle in radians.  TwoPi
Represents 2Pi (360 degrees).  TwoThird
Two third constant.  WrapAngle(Single)
Reduces an angle in radians to the range of pi to -pi.  ZeroTolerance
Represents a "close to zero" value. Inheritance Hierarchy
 Object MathUtils

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)