MCPcopy Create free account
hub / github.com/DegenSugarBoo/OpenBook / assert_close

Function assert_close

tests/unit/models_tests.rs:7–12  ·  view source on GitHub ↗
(left: f64, right: f64, tol: f64)

Source from the content-addressed store, hash-verified

5use ordered_float::OrderedFloat;
6
7fn assert_close(left: f64, right: f64, tol: f64) {
8 assert!(
9 (left - right).abs() <= tol,
10 "left={left}, right={right}, tol={tol}"
11 );
12}
13
14#[test]
15fn estimate_market_impact_buy_with_partial_last_level() {

Calls

no outgoing calls

Tested by

no test coverage detected