MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / asDouble

Method asDouble

include/cpp/Variant.h:375–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373 }
374
375 double Variant::asDouble() const
376 {
377 if (type==typeDouble)
378 return valDouble;
379 else if (type==typeInt)
380 return valInt;
381 else if (type==typeBool)
382 return valBool ? 1.0 : 0.0;
383 else if (type==typeInt64)
384 return (double)valInt64;
385 else if (type==typeObject)
386 return valObject ? valObject->__ToDouble() : 0.0;
387 return 0.0;
388 }
389
390
391 inline hx::Object *Variant::toDynamic() const

Callers 2

operator+Method · 0.80
CompareMethod · 0.80

Calls 1

__ToDoubleMethod · 0.45

Tested by

no test coverage detected