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

math: add a test suite taken from vsl/vmath (#9280)

This commit is contained in:
Ulises Jeremias Cornejo Fandos
2021-03-13 04:05:02 -03:00
committed by GitHub
parent c06e58d418
commit 5e02f6358c
2 changed files with 693 additions and 35 deletions

View File

@ -118,3 +118,8 @@ pub fn min(a f64, b f64) f64 {
pub fn radians(degrees f64) f64 {
return degrees * (pi / 180.0)
}
// signbit returns a value with the boolean representation of the sign for x
pub fn signbit(x f64) bool {
return f64_bits(x) & sign_mask != 0
}