2013-06-13 19:57:30 +02:00

661 lines
24 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Sun Apr 15 20:18:21 CEST 2012 -->
<TITLE>
MathHelper
</TITLE>
<META NAME="date" CONTENT="2012-04-15">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MathHelper";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MathHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../Microsoft/Xna/Framework/DisplayOrientation.html" title="enum in Microsoft.Xna.Framework"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../Microsoft/Xna/Framework/Matrix.html" title="class in Microsoft.Xna.Framework"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?Microsoft/Xna/Framework/MathHelper.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MathHelper.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
Microsoft.Xna.Framework</FONT>
<BR>
Class MathHelper</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>Microsoft.Xna.Framework.MathHelper</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>MathHelper</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Contains commonly used precalculated values.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Halofreak1990</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#E">E</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the mathematical constant e.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Log10E">Log10E</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the log base ten of e.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Log2E">Log2E</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the log base two of e.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Pi">Pi</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the value of pi.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#PiOver2">PiOver2</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the value of pi divided by two.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#PiOver4">PiOver4</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the value of pi divided by four.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#TwoPi">TwoPi</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the value of pi times two.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Barycentric(float, float, float, float, float)">Barycentric</A></B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;value3,
float&nbsp;amount1,
float&nbsp;amount2)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#CatmullRom(float, float, float, float, float)">CatmullRom</A></B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;value3,
float&nbsp;value4,
float&nbsp;amount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a Catmull-Rom interpolation using the specified positions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Clamp(float, float, float)">Clamp</A></B>(float&nbsp;value,
float&nbsp;min,
float&nbsp;max)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restricts a value to be within a specified range.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Distance(float, float)">Distance</A></B>(float&nbsp;value1,
float&nbsp;value2)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the absolute value of the difference of two values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Hermite(float, float, float, float, float)">Hermite</A></B>(float&nbsp;value1,
float&nbsp;tangent1,
float&nbsp;value2,
float&nbsp;tangent2,
float&nbsp;amount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a Hermite spline interpolation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Lerp(float, float, float)">Lerp</A></B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;amount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linearly interpolates between two values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Max(float, float)">Max</A></B>(float&nbsp;value1,
float&nbsp;value2)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the greater of two values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#Min(float, float)">Min</A></B>(float&nbsp;value1,
float&nbsp;value2)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the lesser of two values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#SmoothStep(float, float, float)">SmoothStep</A></B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;amount)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interpolates between two values using a cubic equation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#ToDegrees(float)">ToDegrees</A></B>(float&nbsp;radians)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts radians to degrees.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#ToRadians(float)">ToRadians</A></B>(float&nbsp;degrees)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts degrees to radians.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../Microsoft/Xna/Framework/MathHelper.html#WrapAngle(float)">WrapAngle</A></B>(float&nbsp;angle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reduces a given angle to a value between π and -π.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="E"><!-- --></A><H3>
E</H3>
<PRE>
public static final float <B>E</B></PRE>
<DL>
<DD>Represents the mathematical constant e.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.E">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="Log10E"><!-- --></A><H3>
Log10E</H3>
<PRE>
public static final float <B>Log10E</B></PRE>
<DL>
<DD>Represents the log base ten of e.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.Log10E">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="Log2E"><!-- --></A><H3>
Log2E</H3>
<PRE>
public static final float <B>Log2E</B></PRE>
<DL>
<DD>Represents the log base two of e.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.Log2E">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="Pi"><!-- --></A><H3>
Pi</H3>
<PRE>
public static final float <B>Pi</B></PRE>
<DL>
<DD>Represents the value of pi.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.Pi">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PiOver2"><!-- --></A><H3>
PiOver2</H3>
<PRE>
public static final float <B>PiOver2</B></PRE>
<DL>
<DD>Represents the value of pi divided by two.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.PiOver2">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PiOver4"><!-- --></A><H3>
PiOver4</H3>
<PRE>
public static final float <B>PiOver4</B></PRE>
<DL>
<DD>Represents the value of pi divided by four.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.PiOver4">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="TwoPi"><!-- --></A><H3>
TwoPi</H3>
<PRE>
public static final float <B>TwoPi</B></PRE>
<DL>
<DD>Represents the value of pi times two.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#Microsoft.Xna.Framework.MathHelper.TwoPi">Constant Field Values</A></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Barycentric(float, float, float, float, float)"><!-- --></A><H3>
Barycentric</H3>
<PRE>
public static float <B>Barycentric</B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;value3,
float&nbsp;amount1,
float&nbsp;amount2)</PRE>
<DL>
<DD>Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - The coordinate on one axis of vertex 1 of the defining triangle.<DD><CODE>value2</CODE> - The coordinate on the same axis of vertex 2 of the defining triangle.<DD><CODE>value3</CODE> - The coordinate on the same axis of vertex 3 of the defining triangle.<DD><CODE>amount1</CODE> - The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2.<DD><CODE>amount2</CODE> - The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3.</DL>
</DD>
</DL>
<HR>
<A NAME="CatmullRom(float, float, float, float, float)"><!-- --></A><H3>
CatmullRom</H3>
<PRE>
public static float <B>CatmullRom</B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;value3,
float&nbsp;value4,
float&nbsp;amount)</PRE>
<DL>
<DD>Performs a Catmull-Rom interpolation using the specified positions.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - The first position in the interpolation.<DD><CODE>value2</CODE> - The second position in the interpolation.<DD><CODE>value3</CODE> - The third position in the interpolation.<DD><CODE>value4</CODE> - The fourth position in the interpolation.<DD><CODE>amount</CODE> - Weighting factor.</DL>
</DD>
</DL>
<HR>
<A NAME="Clamp(float, float, float)"><!-- --></A><H3>
Clamp</H3>
<PRE>
public static float <B>Clamp</B>(float&nbsp;value,
float&nbsp;min,
float&nbsp;max)</PRE>
<DL>
<DD>Restricts a value to be within a specified range. Reference page contains links to related code samples.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The value to clamp.<DD><CODE>min</CODE> - The minimum value. If value is less than min, min will be returned.<DD><CODE>max</CODE> - The maximum value. If value is greater than max, max will be returned.</DL>
</DD>
</DL>
<HR>
<A NAME="Distance(float, float)"><!-- --></A><H3>
Distance</H3>
<PRE>
public static float <B>Distance</B>(float&nbsp;value1,
float&nbsp;value2)</PRE>
<DL>
<DD>Calculates the absolute value of the difference of two values.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source value.<DD><CODE>value2</CODE> - Source value.</DL>
</DD>
</DL>
<HR>
<A NAME="Hermite(float, float, float, float, float)"><!-- --></A><H3>
Hermite</H3>
<PRE>
public static float <B>Hermite</B>(float&nbsp;value1,
float&nbsp;tangent1,
float&nbsp;value2,
float&nbsp;tangent2,
float&nbsp;amount)</PRE>
<DL>
<DD>Performs a Hermite spline interpolation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source position.<DD><CODE>tangent1</CODE> - Source tangent.<DD><CODE>value2</CODE> - Source position.<DD><CODE>tangent2</CODE> - Source tangent.<DD><CODE>amount</CODE> - Weighting factor.</DL>
</DD>
</DL>
<HR>
<A NAME="Lerp(float, float, float)"><!-- --></A><H3>
Lerp</H3>
<PRE>
public static float <B>Lerp</B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;amount)</PRE>
<DL>
<DD>Linearly interpolates between two values.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source value.<DD><CODE>value2</CODE> - Source value.<DD><CODE>amount</CODE> - Value between 0 and 1 indicating the weight of value2.</DL>
</DD>
</DL>
<HR>
<A NAME="Max(float, float)"><!-- --></A><H3>
Max</H3>
<PRE>
public static float <B>Max</B>(float&nbsp;value1,
float&nbsp;value2)</PRE>
<DL>
<DD>Returns the greater of two values.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source value.<DD><CODE>value2</CODE> - Source value.</DL>
</DD>
</DL>
<HR>
<A NAME="Min(float, float)"><!-- --></A><H3>
Min</H3>
<PRE>
public static float <B>Min</B>(float&nbsp;value1,
float&nbsp;value2)</PRE>
<DL>
<DD>Returns the lesser of two values.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source value.<DD><CODE>value2</CODE> - Source value.</DL>
</DD>
</DL>
<HR>
<A NAME="SmoothStep(float, float, float)"><!-- --></A><H3>
SmoothStep</H3>
<PRE>
public static float <B>SmoothStep</B>(float&nbsp;value1,
float&nbsp;value2,
float&nbsp;amount)</PRE>
<DL>
<DD>Interpolates between two values using a cubic equation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value1</CODE> - Source value.<DD><CODE>value2</CODE> - Source value.<DD><CODE>amount</CODE> - Weighting value.</DL>
</DD>
</DL>
<HR>
<A NAME="ToDegrees(float)"><!-- --></A><H3>
ToDegrees</H3>
<PRE>
public static float <B>ToDegrees</B>(float&nbsp;radians)</PRE>
<DL>
<DD>Converts radians to degrees.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ToRadians(float)"><!-- --></A><H3>
ToRadians</H3>
<PRE>
public static float <B>ToRadians</B>(float&nbsp;degrees)</PRE>
<DL>
<DD>Converts degrees to radians.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="WrapAngle(float)"><!-- --></A><H3>
WrapAngle</H3>
<PRE>
public static float <B>WrapAngle</B>(float&nbsp;angle)</PRE>
<DL>
<DD>Reduces a given angle to a value between π and -π.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angle</CODE> - The angle to reduce, in radians.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MathHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../Microsoft/Xna/Framework/DisplayOrientation.html" title="enum in Microsoft.Xna.Framework"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../Microsoft/Xna/Framework/Matrix.html" title="class in Microsoft.Xna.Framework"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?Microsoft/Xna/Framework/MathHelper.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MathHelper.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>