mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
19 lines
211 B
V
19 lines
211 B
V
module math
|
|
|
|
pub fn inf(sign int) f64 {
|
|
mut res := 0.0
|
|
if sign >= 0 {
|
|
#res.val = Infinity
|
|
} else {
|
|
#res.val = -Infinity
|
|
}
|
|
return res
|
|
}
|
|
|
|
pub fn nan() f64 {
|
|
mut res := 0.0
|
|
#res.val = NaN
|
|
|
|
return res
|
|
}
|