MCPcopy Create free account
hub / github.com/MyGUI/mygui / round_nearest_nzero

Function round_nearest_nzero

UnitTests/TestApp/pugixml.cpp:7188–7193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7186}
7187
7188PUGI__FN double round_nearest_nzero(double value)
7189{
7190 // same as round_nearest, but returns -0 for [-0.5, -0]
7191 // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)
7192 return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);
7193}
7194
7195PUGI__FN const char_t* qualified_name(const xpath_node& node)
7196{

Callers 1

eval_numberMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected