func (vm *VM) Extract_variable_as_double(variable_name string) (float64, error) { /*Extract a variable from the VM after if have been executed If something went wrong return nil */ var unqlite_value *Unqlite_value unqlite_value = vm.Unqlite_vm_extract_variable(variable_name) if !unqlite_value_ok(unqlite_value) { return 0.0, nil } res := float64(C.unqlite_value_to_double(unqlite_value.unqlite_value)) return res, GlobaLError("OK") }
func (v *Value) ToDouble() float64 { f := C.unqlite_value_to_double(v.v) return float64(f) }