MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / round_nearest_nzero

Function round_nearest_nzero

lib/pugixml/src/pugixml.cpp:8436–8441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8434 }
8435
8436 PUGI__FN double round_nearest_nzero(double value)
8437 {
8438 // same as round_nearest, but returns -0 for [-0.5, -0]
8439 // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)
8440 return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);
8441 }
8442
8443 PUGI__FN const char_t* qualified_name(const xpath_node& node)
8444 {

Callers 1

eval_numberMethod · 0.85

Calls 1

floorFunction · 0.85

Tested by

no test coverage detected