コード例 #1
0
        /// <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);
        }
コード例 #2
0
 /// <summary>
 /// Applies acceleration to velocity
 /// </summary>
 /// <param name="velocity">Velocity</param>
 /// <returns>Result</returns>
 public Fix64Velocity ApplyAcceleration(Fix64Velocity velocity)
 {
     ApplyAcceleration(ref velocity);
     return(velocity);
 }
コード例 #3
0
 /// <summary>
 /// Applies acceleration to velocity
 /// </summary>
 /// <param name="velocity">Velocity</param>
 public void ApplyAcceleration(ref Fix64Velocity velocity)
 {
     velocity.Speed += Speed;
     velocity.Angle += Angle;
 }