pub fn event_absolute_position(len: u32, index: i32) -> Option<u32>Expand description
Calculates the absolute position of the event. Accepts both positive and negative indexing.
ยงExamples
assert_eq!(event_absolute_position(10, 0), Some(0));
assert_eq!(event_absolute_position(10, -1), Some(9));
assert_eq!(event_absolute_position(10, 10), None);