pub fn position_value(entry_perp_delta: I256, mark_price: f64) -> f64Expand description
Calculate the current position value at a given mark price.
value = |size| × mark_price§Examples
let val = position_value(I256::try_from(1_000_000i64).unwrap(), 1600.0);
assert!((val - 1600.0).abs() < 0.001);