/// <summary> /// Applies acceleration to velocity /// </summary> /// <param name="velocity">Velocity</param> public void ApplyAcceleration(ref Fix64Velocity velocity) { //velocity.LinearVelocity = Acceleration + velocity.LinearVelocity; Fix64Vector2 start = velocity.LinearVelocity; velocity.LinearVelocity = new Fix64Vector2(Acceleration.X + start.X, Acceleration.Y + start.Y); }
/// <summary> /// Applies acceleration to velocity /// </summary> /// <param name="velocity">Velocity</param> /// <returns>Result</returns> public Fix64Velocity ApplyAcceleration(Fix64Velocity velocity) { ApplyAcceleration(ref velocity); return(velocity); }
/// <summary> /// Applies acceleration to velocity /// </summary> /// <param name="velocity">Velocity</param> public void ApplyAcceleration(ref Fix64Velocity velocity) { velocity.Speed += Speed; velocity.Angle += Angle; }