mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 07:48:03 +02:00
[script] Correct the math min and max functions
Were the wrong way round and confusingly written. Also adds a MathPi constant.
This commit is contained in:
parent
1a4e3372fa
commit
d32a075e7a
1 changed files with 8 additions and 5 deletions
|
|
@ -3,14 +3,14 @@ fun MathAbs (value){
|
|||
return value;
|
||||
}
|
||||
|
||||
fun MathMin (value, min){
|
||||
if (value < min) return min;
|
||||
return value;
|
||||
fun MathMin (value_a, value_b){
|
||||
if (value_a < value_b) return value_a;
|
||||
return value_b;
|
||||
}
|
||||
|
||||
fun MathMax (value, max){
|
||||
if (value > max) return max;
|
||||
return value;
|
||||
if (value_a > value_a) return value_a;
|
||||
return value_b;
|
||||
}
|
||||
|
||||
fun MathClamp (value, min, max){
|
||||
|
|
@ -18,3 +18,6 @@ fun MathClamp (value, min, max){
|
|||
if (value > max) return max;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
MathPi = 3.14159265358979323846;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue