MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / as_float

Method as_float

Source/Utils/dukglue/dukvalue.h:330–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 }
329
330 inline float as_float() const {
331 if (mType != NUMBER)
332 throw DukException() << "Expected number, got " << type_name();
333 return static_cast<float>(mPOD.number);
334 }
335
336 inline duk_int_t as_int() const {
337 if (mType != NUMBER)

Callers

nothing calls this directly

Calls 2

DukExceptionClass · 0.85
type_nameFunction · 0.85

Tested by

no test coverage detected