* xmlXPathCastNumberToBoolean: * @val: a number * * Converts a number to its boolean value * * Returns the boolean value */
| 4976 | * Returns the boolean value |
| 4977 | */ |
| 4978 | int |
| 4979 | xmlXPathCastNumberToBoolean (double val) { |
| 4980 | if (xmlXPathIsNaN(val) || (val == 0.0)) |
| 4981 | return(0); |
| 4982 | return(1); |
| 4983 | } |
| 4984 | |
| 4985 | /** |
| 4986 | * xmlXPathCastStringToBoolean: |
no test coverage detected