Float returns v's underlying value. It panics if v's underlying type is not TypeFloat16, TypeFloat32, or TypeFloat64.
()
| 106 | // Float returns v's underlying value. It panics if v's underlying type is not |
| 107 | // TypeFloat16, TypeFloat32, or TypeFloat64. |
| 108 | func (v Value) Float() float64 { |
| 109 | if !IsFloat(v.Type().ID()) { |
| 110 | panic(fmt.Sprintf("super.Value.Float called on %T", v.Type())) |
| 111 | } |
| 112 | if x, ok := v.native(); ok { |
| 113 | return math.Float64frombits(x) |
| 114 | } |
| 115 | return DecodeFloat(v.bytes()) |
| 116 | } |
| 117 | |
| 118 | // Bool returns v's underlying value. It panics if v's underlying type is not |
| 119 | // TypeBool. |
no test coverage detected