Skip to main content

wrap

Function wrap 

Source
fn wrap(v: i64, n: i64) -> i64
Expand description

Euclidean v mod n, using a mask when n is a power of two (almost every Build texture): an integer division per pixel was a large part of the wall/floor cost.