コード例 #1
0
 /// <summary>
 /// Clamps quaternion values to zero using the default tolerance value.
 /// </summary>
 /// <remarks>
 /// The quaternion values that are close to zero within the given tolerance are set to zero.
 /// The tolerance value used is <see cref="MathFunctions.EpsilonD"/>
 /// </remarks>
 public void ClampZero()
 {
     _x = MathFunctions.Clamp(_x, 0);
     _y = MathFunctions.Clamp(_y, 0);
     _z = MathFunctions.Clamp(_z, 0);
     _w = MathFunctions.Clamp(_w, 0);
 }
コード例 #2
0
 /// <summary>
 /// Clamps quaternion values to zero using a given tolerance value.
 /// </summary>
 /// <param name="tolerance">The tolerance to use.</param>
 /// <remarks>
 /// The quaternion values that are close to zero within the given tolerance are set to zero.
 /// </remarks>
 public void ClampZero(double tolerance)
 {
     _x = MathFunctions.Clamp(_x, 0, tolerance);
     _y = MathFunctions.Clamp(_y, 0, tolerance);
     _z = MathFunctions.Clamp(_z, 0, tolerance);
     _w = MathFunctions.Clamp(_w, 0, tolerance);
 }
コード例 #3
0
 /// <summary>
 /// Clamps vector values to zero using a given tolerance value.
 /// </summary>
 /// <param name="tolerance">The tolerance to use.</param>
 /// <remarks>
 /// The vector values that are close to zero within the given tolerance are set to zero.
 /// </remarks>
 public void ClampZero(float tolerance)
 {
     _x = MathFunctions.Clamp(_x, 0.0f, tolerance);
     _y = MathFunctions.Clamp(_y, 0.0f, tolerance);
     _z = MathFunctions.Clamp(_z, 0.0f, tolerance);
     _w = MathFunctions.Clamp(_w, 0.0f, tolerance);
 }
コード例 #4
0
ファイル: Vector2F.cs プロジェクト: wkumanuvong/StackBuilder
 /// <summary>
 /// Clamps vector values to zero using a given tolerance value.
 /// </summary>
 /// <param name="tolerance">The tolerance to use.</param>
 /// <remarks>
 /// The vector values that are close to zero within the given tolerance are set to zero.
 /// </remarks>
 public void ClampZero(float tolerance)
 {
     _x = MathFunctions.Clamp(_x, 0, tolerance);
     _y = MathFunctions.Clamp(_y, 0, tolerance);
 }
コード例 #5
0
ファイル: Vector2F.cs プロジェクト: stenfalp/Sharp3D.Math
 /// <summary>
 /// Clamps vector values to zero using the default tolerance value.
 /// </summary>
 /// <remarks>
 /// The vector values that are close to zero within the given tolerance are set to zero.
 /// The tolerance value used is <see cref="MathFunctions.EpsilonF"/>
 /// </remarks>
 public void ClampZero()
 {
     _x = MathFunctions.Clamp(_x, 0.0f);
     _y = MathFunctions.Clamp(_y, 0.0f);
 }