Export (0) Print
Expand All

MathHelper Class

Contains commonly used precalculated values.

System.Object
  Microsoft.Xna.Framework.MathHelper

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

'Declaration
Public NotInheritable Class MathHelper

The MathHelper type exposes the following members.

  NameDescription
Public methodStatic memberBarycentricReturns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.
Public methodStatic memberCatmullRomPerforms a Catmull-Rom interpolation using the specified positions.
Public methodStatic memberClampRestricts a value to be within a specified range.
Public methodStatic memberDistanceCalculates the absolute value of the difference of two values.
Public methodStatic memberHermitePerforms a Hermite spline interpolation.
Public methodStatic memberLerpLinearly interpolates between two values.
Public methodStatic memberMaxReturns the greater of two values.
Public methodStatic memberMinReturns the lesser of two values.
Public methodStatic memberSmoothStepInterpolates between two values using a cubic equation.
Public methodStatic memberToDegreesConverts radians to degrees.
Public methodStatic memberToRadiansConverts degrees to radians.
Public methodStatic memberWrapAngleReduces a given angle to a value between pi and -pi.
Top

  NameDescription
Public fieldStatic memberERepresents the mathematical constant e.
Public fieldStatic memberLog10ERepresents the log base ten of e.
Public fieldStatic memberLog2ERepresents the log base two of e.
Public fieldStatic memberPiRepresents the value of pi.
Public fieldStatic memberPiOver2Represents the value of pi divided by two.
Public fieldStatic memberPiOver4Represents the value of pi divided by four.
Public fieldStatic memberTwoPiRepresents the value of pi times two.
Top

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft