private void _StartTurn(Vector2d targetRot) { long tempCheck; if (targetRot.NotZero() && (((tempCheck = Agent.Body._rotation.Cross(targetRot.x, targetRot.y)) != 0) || (Agent.Body._rotation.Dot(targetRot.x, targetRot.y) < 0)) ) { if (tempCheck.AbsLessThan(turnSin) && Agent.Body._rotation.Dot(targetRot.x, targetRot.y) > 0) { targetRotation = targetRot; Arrive(); } else { cachedBeginCheck = tempCheck; targetRotation = targetRot; targetReached = false; } } else { } }
private void _StartTurn(Vector2d targetRot) { long tempCheck; if (targetRot.NotZero() && (tempCheck = cachedBody._rotation.Cross(targetRot.x, targetRot.y)) != 0) { if (tempCheck.AbsMoreThan(turnSin) == false && cachedBody._rotation.Dot(targetRot.x, targetRot.y) > 0) { targetRotation = targetRot; Arrive(); } else { cachedBeginCheck = tempCheck; targetRotation = targetRot; targetReached = false; } } else { } }
private void _StartTurn(Vector2d targetRot) { long tempCheck; if (targetRot.NotZero () && (tempCheck = cachedBody.Rotation.Cross (targetRot.x, targetRot.y)) != 0) { if (tempCheck.AbsMoreThan (turnSin) == false && cachedBody.Rotation.Dot (targetRot.x,targetRot.y) > 0) { targetRotation = targetRot; Arrive (); } else { cachedBeginCheck = tempCheck; targetRotation = targetRot; targetReached = false; } } else { } }