mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
math: make ceil return an f64
This commit is contained in:
parent
6bcd0fd9cc
commit
b9e7d02462
@ -45,8 +45,8 @@ pub fn cbrt(a f64) f64 {
|
|||||||
return C.cbrt(a)
|
return C.cbrt(a)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ceil returns the nearest integer greater or equal to the provided value.
|
// ceil returns the nearest f64 greater or equal to the provided value.
|
||||||
pub fn ceil(a f64) int {
|
pub fn ceil(a f64) f64 {
|
||||||
return C.ceil(a)
|
return C.ceil(a)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ pub fn factorial(n int) i64 {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// floor returns the nearest integer lower or equal of the provided value.
|
// floor returns the nearest f64 lower or equal of the provided value.
|
||||||
pub fn floor(a f64) f64 {
|
pub fn floor(a f64) f64 {
|
||||||
return C.floor(a)
|
return C.floor(a)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user