Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerroEngine/Perro
/ nearly_eq
Function
nearly_eq
perro_source/api_modules/perro_modules/src/math.rs:281–283 ·
view source on GitHub ↗
(a: f32, b: f32, epsilon: f32)
Source
from the content-addressed store, hash-verified
279
280
#[inline]
281
pub fn nearly_eq(a: f32, b: f32, epsilon: f32) -> bool {
282
(a - b).abs() <= epsilon.abs()
283
}
284
285
#[cfg(test)]
286
#[path =
"../tests/unit/math_tests.rs"
]
Callers
1
math_macros_typecheck_and_forward
Function · 0.50
Calls
1
abs
Method · 0.45
Tested by
1
math_macros_typecheck_and_forward
Function · 0.40