MCPcopy Create free account
hub / github.com/buke/quickjs-go / ToFloat64

Method ToFloat64

value.go:214–218  ·  view source on GitHub ↗

ToFloat64 returns the float64 value of the value.

()

Source from the content-addressed store, hash-verified

212
213// ToFloat64 returns the float64 value of the value.
214func (v *Value) ToFloat64() float64 {
215 val := C.double(0)
216 C.JS_ToFloat64(v.ctx.ref, &val, v.ref)
217 return float64(val)
218}
219
220// Deprecated: Use ToBigInt instead.
221func (v *Value) BigInt() *big.Int {

Callers 15

Float64Method · 0.95
TestContextBasicsFunction · 0.80
TestDeprecatedAPIsFunction · 0.80
unmarshalMethod · 0.80
unmarshalInterfaceMethod · 0.80
TestModuleBuilder_BasicFunction · 0.80
TestModuleBuilder_ImportFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestContextBasicsFunction · 0.64
TestDeprecatedAPIsFunction · 0.64
TestModuleBuilder_BasicFunction · 0.64
TestModuleBuilder_ImportFunction · 0.64
TestValueConversionsFunction · 0.64