MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_Math_trunc

Function fx_Math_trunc

xs/sources/xsMath.c:707–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705}
706
707void fx_Math_trunc(txMachine* the)
708{
709 mxNanResultIfNoArg;
710 fxToNumber(the, mxArgv(0));
711 mxResult->kind = XS_NUMBER_KIND;
712 mxResult->value.number = c_trunc(mxArgv(0)->value.number);
713 fx_Math_toInteger(the);
714}
715
716void fx_Math_toInteger(txMachine* the)
717{

Callers

nothing calls this directly

Calls 2

fxToNumberFunction · 0.85
fx_Math_toIntegerFunction · 0.85

Tested by

no test coverage detected