MCPcopy Create free account
hub / github.com/WheretIB/nullc / DoubleToStr

Method DoubleToStr

NULLC/StdLib.cpp:715–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715NULLCArray NULLC::DoubleToStr(int precision, double* r)
716{
717 char buf[256];
718 SafeSprintf(buf, 256, "%.*f", precision, *r);
719 NULLCArray arr = AllocArray(1, (int)strlen(buf) + 1);
720 memcpy(arr.ptr, buf, arr.len);
721 return arr;
722}
723
724NULLCFuncPtr NULLC::FunctionRedirect(NULLCRef r, NULLCArray* arr)
725{

Callers

nothing calls this directly

Calls 1

SafeSprintfFunction · 0.70

Tested by

no test coverage detected