mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 06:33:34 +02:00
Zufallsfarben und weitere mathematische Funktionen
This commit is contained in:
@@ -111,6 +111,10 @@ public class Constants {
|
|||||||
return new Color(red, green, blue, alpha);
|
return new Color(red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Color randomColor() {
|
||||||
|
return color(random(10, 255), random(10, 255), random(10, 255), 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static double abs( double x ) {
|
public static double abs( double x ) {
|
||||||
return Math.abs(x);
|
return Math.abs(x);
|
||||||
@@ -132,6 +136,14 @@ public class Constants {
|
|||||||
return Math.ceil(x);
|
return Math.ceil(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double sqrt( double x ) {
|
||||||
|
return Math.sqrt(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double pow( double x, double p ) {
|
||||||
|
return Math.pow(x, p);
|
||||||
|
}
|
||||||
|
|
||||||
public static double sin( double x ) {
|
public static double sin( double x ) {
|
||||||
return Math.sin(x);
|
return Math.sin(x);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user