Gitly
Log in
Register
v
/
vlib
/
math
Raw file
|
18 loc (15 sloc)
|
211 bytes
|
Latest commit hash 1570e613b
1
module
math
2
3
pub
fn
inf(sign int) f64 {
4
mut
res := 0.0
5
if
sign >= 0 {
6
#res.val = Infinity
7
}
else
{
8
#res.val = -Infinity
9
}
10
return
res
11
}
12
13
pub
fn
nan() f64 {
14
mut
res := 0.0
15
#res.val = NaN
16
17
return
res
18
}