BEPUutilities.MathChecker.Validate C# (CSharp) Method

Validate() private method

private Validate ( this f ) : void
f this
return void
        public static void Validate(this float f)
        {
            if (IsInvalid(f))
            {
                throw new NotFiniteNumberException("Invalid value.");
            }
        }

Usage Example

Ejemplo n.º 1
0
 //These methods are very direct and quick.  They don't activate the object or anything.
 /// <summary>
 /// Applies a linear velocity change to the entity using the given impulse.
 /// This method does not wake up the object or perform any other nonessential operation;
 /// it is meant to be used for performance-sensitive constraint solving.
 /// Consider equivalently adding to the LinearMomentum property for convenience instead.
 /// </summary>
 /// <param name="impulse">Impulse to apply.</param>
 public void ApplyLinearImpulse(ref Vector3 impulse)
 {
     linearVelocity.X += impulse.X * inverseMass;
     linearVelocity.Y += impulse.Y * inverseMass;
     linearVelocity.Z += impulse.Z * inverseMass;
     MathChecker.Validate(linearVelocity);
 }
All Usage Examples Of BEPUutilities.MathChecker::Validate