lethexa-motionpredict.js
function(myPos, myVelo, targetPos, targetVelo) {
    var ticpt = this.calcInterceptTime(myPos, myVelo, targetPos, targetVelo);
    if(ticpt === undefined)
      return undefined;
    return this.getPositionByVeloAndTime(targetPos, targetVelo, ticpt);
  }
function(myPos, myVelo, targetPos, targetVelo) {
    var ticpt = this.calcInterceptTime(myPos, myVelo, targetPos, targetVelo);
    if(ticpt === undefined)
      return undefined;
    return this.getPositionByVeloAndTime(targetPos, targetVelo, ticpt);
  }
function ( myPos , myVelo , targetPos , targetVelo ) { var ticpt = this . calcInterceptTime ( myPos , myVelo , targetPos , targetVelo ) ; if ( ticpt === undefined ) return undefined ; return this . getPositionByVeloAndTime ( targetPos , targetVelo , ticpt ) ; }
Calculates the intercept-position of the target.
@method calcInterceptPosition
@param myPos {Vector3d} The position of the interceptor.
@param myVelo {Number} The velocity at which the target should be intercepted.
@param targetPos {Vector3d} The position of the target.
@param targetVelo {Vector3d} The velocity and direction in which the target is moving.
@return {Vector3d} The position at which the target is reached.
@for motionpredict
Calculates the intercept - position of the target .