Example #1
0
 /// <summary>
 /// Transposes this matrix.
 /// </summary>
 public void Transpose()
 {
     MathFunctions.Swap(ref _m12, ref _m21);
     MathFunctions.Swap(ref _m13, ref _m31);
     MathFunctions.Swap(ref _m23, ref _m32);
 }
Example #2
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(double tolerance)
 {
     _x = MathFunctions.Clamp(_x, 0, tolerance);
     _y = MathFunctions.Clamp(_y, 0, tolerance);
     _z = MathFunctions.Clamp(_z, 0, tolerance);
 }
Example #3
0
 /// <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.EpsilonD"/>
 /// </remarks>
 public void ClampZero()
 {
     _x = MathFunctions.Clamp(_x, 0);
     _y = MathFunctions.Clamp(_y, 0);
     _z = MathFunctions.Clamp(_z, 0);
 }
Example #4
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);
 }