Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TornadoMath double version of trigonometric functions added #484

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
public class TornadoMath {

public static float min(float a, float b) {
return (a > b) ? b : a;
return Math.min(a, b);
}

public static double min(double a, double b) {
return (a > b) ? b : a;
return Math.min(a, b);
}

public static long min(long a, long b) {
return (a > b) ? b : a;
return Math.min(a, b);
}

public static int min(int a, int b) {
return (a > b) ? b : a;
return Math.min(a, b);
}

public static short min(short a, short b) {
Expand All @@ -64,19 +64,19 @@ public static byte min(byte a, byte b) {
}

public static double max(double a, double b) {
return (a > b) ? a : b;
return Math.max(a, b);
}

public static float max(float a, float b) {
return (a > b) ? a : b;
return Math.max(a, b);
}

public static long max(long a, long b) {
return (a > b) ? a : b;
return Math.max(a, b);
}

public static int max(int a, int b) {
return (a > b) ? a : b;
return Math.max(a, b);
}

public static short max(short a, short b) {
Expand Down Expand Up @@ -384,15 +384,26 @@ public static float atan(float value) {
return (float) Math.atan(value);
}

public static double atan(double value) {
return Math.atan(value);
}

public static float tan(float value) {
return (float) Math.tan(value);
}

public static double tan(double value) {
return Math.tan(value);
}

public static float tanh(float value) {
return (float) Math.tanh(value);
}

public static double tanh(double value) {
return Math.tanh(value);
}

public static float floatPI() {
return (float) Math.PI;
}
Expand All @@ -413,6 +424,10 @@ public static float atan2(float a, float b) {
return (float) Math.atan2(a, b);
}

public static double atan2(double a, double b) {
return Math.atan2(a, b);
}

public static float acos(float a) {
return (float) Math.acos(a);
}
Expand Down Expand Up @@ -465,6 +480,10 @@ public static float toRadians(float angdeg) {
return (float) Math.toRadians(angdeg);
}

public static double toRadians(double angdeg) {
return Math.toRadians(angdeg);
}

public static float sinpi(float angle) {
return (float) Math.sin(angle * Math.PI);
}
Expand Down
Loading