Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool IsRejecteg(const Vector3& dronePosition, const Vector3& droneForward, const Vector3& targetWaypoint)
- {
- Vector3 waypoint = targetWaypoint - dronePosition;
- if (length(waypoint) >= 10) return true;
- float cosA = dot(waypoint, droneForward)/(length(waypoint)*length(droneForward)); //(cosA=dot(x1, x2)/|x1||x2|)
- return cosA < 0.5; //(cos60 = 1/2, если угл А < 60, cosA < 1/2, )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement