inline NotNull and add Contract annotations

This commit is contained in:
MrGazdag 2021-07-04 18:00:09 +02:00 committed by GitHub
parent 118159d354
commit 02abb81b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);