mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-07 00:48:28 +01:00
Remove float cast
This commit is contained in:
parent
fda7b8cda1
commit
95e69c6f53
@ -183,9 +183,9 @@ public interface Vec {
|
|||||||
* @param vec the other vector
|
* @param vec the other vector
|
||||||
* @return angle in radians
|
* @return angle in radians
|
||||||
*/
|
*/
|
||||||
default float angle(@NotNull Vec vec) {
|
default double angle(@NotNull Vec vec) {
|
||||||
final double dot = MathUtils.clamp(dot(vec) / (length() * vec.length()), -1.0, 1.0);
|
final double dot = MathUtils.clamp(dot(vec) / (length() * vec.length()), -1.0, 1.0);
|
||||||
return (float) Math.acos(dot);
|
return Math.acos(dot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user