math.mInf() 函数
math.mInf() 如果 sign >= 0 返回正无穷,如果 sign < 0 返回负无穷。
函数类型签名
(sign: int) => float
有关更多信息,请参见 Function type signatures。
参数
签到
(必填) 要操作的值。
示例
从正值或负值返回一个无限浮点值
import "math"
math.mInf(sign: 1)// +Inf
在map中使用math.mInf
import "sampledata"
import "math"
sampledata.int()
|> map(fn: (r) => ({r with _value: math.mInf(sign: r._value)}))