1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: move the math.mathutil generic min/max/abs fns to math (#13042)

This commit is contained in:
Delyan Angelov
2022-01-05 18:02:20 +02:00
committed by GitHub
parent de711da774
commit 59357e873d
24 changed files with 180 additions and 100 deletions

View File

@ -61,24 +61,6 @@ pub fn digits(_n int, base int) []int {
return res
}
// max returns the maximum value of the two provided.
[inline]
pub fn max(a f64, b f64) f64 {
if a > b {
return a
}
return b
}
// min returns the minimum value of the two provided.
[inline]
pub fn min(a f64, b f64) f64 {
if a < b {
return a
}
return b
}
// minmax returns the minimum and maximum value of the two provided.
pub fn minmax(a f64, b f64) (f64, f64) {
if a < b {