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:

committed by
GitHub

parent
c06e58d418
commit
5e02f6358c
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user