Merge pull request #304 from furplag/legacy

fix exception occur when invalid yaw ( negative value ) given .
This commit is contained in:
Thorinwasher
2023-12-28 17:11:26 +01:00
committed by GitHub

View File

@@ -113,6 +113,9 @@ public final class DirectionHelper {
* @return <p>A normal vector</p>
*/
public static Vector getCoordinateVectorFromRelativeVector(double right, double down, double out, double yaw) {
//Make sure the yaw is between 0 and 360
yaw = normalizeYaw(yaw);
if (yaw == 0) {
//South
return new Vector(right, -down, out);