Checks if the input floating point number is 1.0f checking if the difference is within a range defined with epsilon * * @param[in] a Input floating point number * @param[in] epsilon (Optional) Epsilon used to define the error bounds * * @return True if number is close to 1.0f */
| 98 | * @return True if number is close to 1.0f |
| 99 | */ |
| 100 | inline bool is_one(float a, float epsilon = 0.00001f) |
| 101 | { |
| 102 | return std::abs(1.0f - a) <= epsilon; |
| 103 | } |
| 104 | |
| 105 | /** Checks if the input floating point number is 0.0f checking if the difference is within a range defined with epsilon |
| 106 | * |
no test coverage detected