From b950a859c9163cc84bfd83ca24446a04b7a6462b Mon Sep 17 00:00:00 2001 From: Efnilite <35348263+Efnilite@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:43:38 +0100 Subject: [PATCH] fix angle comparison --- src/main/java/ch/njol/skript/conditions/CondCompare.java | 1 - .../java/ch/njol/skript/expressions/ExprVectorAngleBetween.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ch/njol/skript/conditions/CondCompare.java b/src/main/java/ch/njol/skript/conditions/CondCompare.java index 22aebec5d26..e4bf9fd6784 100644 --- a/src/main/java/ch/njol/skript/conditions/CondCompare.java +++ b/src/main/java/ch/njol/skript/conditions/CondCompare.java @@ -235,7 +235,6 @@ private boolean init(String expr) { comparator = Comparators.getComparator(first.getReturnType(), secondReturnType); } } - } return comparator != null; diff --git a/src/main/java/ch/njol/skript/expressions/ExprVectorAngleBetween.java b/src/main/java/ch/njol/skript/expressions/ExprVectorAngleBetween.java index b2ede8461b9..db1c2162def 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprVectorAngleBetween.java +++ b/src/main/java/ch/njol/skript/expressions/ExprVectorAngleBetween.java @@ -62,7 +62,7 @@ protected Number[] get(Event event) { Vector second = this.second.getSingle(event); if (first == null || second == null) return null; - return CollectionUtils.array(first.angle(second) * (float) 180 / Math.PI); // rad to deg + return CollectionUtils.array(first.angle(second) * (180.0 / Math.PI)); // rad to deg } @Override