From 02abb81b85d923c007d84e0f306c90aaa9420d7d Mon Sep 17 00:00:00 2001 From: MrGazdag <44264503+MrGazdag@users.noreply.github.com> Date: Sun, 4 Jul 2021 18:00:09 +0200 Subject: [PATCH] inline NotNull and add Contract annotations --- .../net/minestom/server/utils/incubator/Vec.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/minestom/server/utils/incubator/Vec.java b/src/main/java/net/minestom/server/utils/incubator/Vec.java index c55930cf3..521b45e43 100644 --- a/src/main/java/net/minestom/server/utils/incubator/Vec.java +++ b/src/main/java/net/minestom/server/utils/incubator/Vec.java @@ -292,8 +292,8 @@ public final class Vec implements Point { * in radians * @return a new, rotated vector */ - @NotNull - public Vec rotateAroundX(double angle) { + @Contract(pure = true) + public @NotNull Vec rotateAroundX(double angle) { double angleCos = Math.cos(angle); double angleSin = Math.sin(angle); @@ -314,8 +314,8 @@ public final class Vec implements Point { * in radians * @return a new, rotated vector */ - @NotNull - public Vec rotateAroundY(double angle) { + @Contract(pure = true) + public @NotNull Vec rotateAroundY(double angle) { double angleCos = Math.cos(angle); double angleSin = Math.sin(angle); @@ -336,8 +336,8 @@ public final class Vec implements Point { * in radians * @return a new, rotated vector */ - @NotNull - public Vec rotateAroundZ(double angle) { + @Contract(pure = true) + public @NotNull Vec rotateAroundZ(double angle) { double angleCos = Math.cos(angle); double angleSin = Math.sin(angle);