Normalize() public method

public Normalize ( ) : Vector
return Vector
Ejemplo n.º 1
0
 /// <summary>
 /// Sets a request to move the lifelet with the given velocity.
 /// </summary>
 protected void move(Vector v)
 {
     // Put a cap on vel
     double n = v.Norm();
     if(n > Config.LifeletMaximumVelocityRequest) {
         v = v.Normalize() * Config.LifeletMaximumVelocityRequest;
     }
     // Update requested velocity for next simulate
     _velReq = v;
 }