MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPathCastNumberToBoolean

Function xmlXPathCastNumberToBoolean

ThirdParty/libxml2/vtklibxml2/xpath.c:4978–4983  ·  view source on GitHub ↗

* xmlXPathCastNumberToBoolean: * @val: a number * * Converts a number to its boolean value * * Returns the boolean value */

Source from the content-addressed store, hash-verified

4976 * Returns the boolean value
4977 */
4978int
4979xmlXPathCastNumberToBoolean (double val) {
4980 if (xmlXPathIsNaN(val) || (val == 0.0))
4981 return(0);
4982 return(1);
4983}
4984
4985/**
4986 * xmlXPathCastStringToBoolean:

Callers 2

xmlXPathCastToBooleanFunction · 0.85

Calls 1

xmlXPathIsNaNFunction · 0.85

Tested by

no test coverage detected