orca_whirlpools_docs::orca_whirlpools_core

Function invert_tick_index

pub fn invert_tick_index(tick_index: i32) -> i32
Expand description

Get the tick index for the inverse of the price that this tick represents. Eg: Consider tick i where Pb/Pa = 1.0001 ^ i inverse of this, i.e. Pa/Pb = 1 / (1.0001 ^ i) = 1.0001^-i

§Parameters

  • tick_index - A i32 integer representing the tick integer

§Returns

  • A i32 integer representing the tick index for the inverse of the price