MCPcopy Create free account
hub / github.com/beefytech/Beef / round

Function round

BeefRT/MinRT/MinRT.cpp:480–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480extern "C" __declspec(dllexport) double round(double val)
481{
482 if (!_finite(val))
483 {
484 return val;
485 }
486 else if (val >= 0)
487 {
488 double result = floor(val);
489 if (result - val <= -0.5)
490 result += 1.0;
491 return result;
492 }
493 else
494 {
495 double result = floor(-val);
496 if (result + val <= -0.5)
497 result += 1.0;
498 return -result;
499 }
500}
501
502extern "C" __declspec(dllexport) char* strdup(const char* str)
503{

Callers 7

ResizeFunction · 0.85
parseAsTimeMethod · 0.85
RoundMethod · 0.85
ticker.pyFile · 0.85
prof_double_uint64_castFunction · 0.85
prof_unbias_map_initFunction · 0.85
prof_leakcheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected