mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Added ternary versions of min and max.
This commit is contained in:
parent
ef5fba0f05
commit
9c070c323f
@ -89,10 +89,18 @@ public final class Functions {
|
||||
return Math.min(a.invoke(), b.invoke());
|
||||
}
|
||||
|
||||
public static final double min(Invokable a, Invokable b, Invokable c) throws Exception {
|
||||
return Math.min(a.invoke(), Math.min(b.invoke(), c.invoke()));
|
||||
}
|
||||
|
||||
public static final double max(Invokable a, Invokable b) throws Exception {
|
||||
return Math.max(a.invoke(), b.invoke());
|
||||
}
|
||||
|
||||
public static final double max(Invokable a, Invokable b, Invokable c) throws Exception {
|
||||
return Math.max(a.invoke(), Math.max(b.invoke(), c.invoke()));
|
||||
}
|
||||
|
||||
|
||||
public static final double ceil(Invokable x) throws Exception {
|
||||
return Math.ceil(x.invoke());
|
||||
|
Loading…
Reference in New Issue
Block a user