CN - Replaced lrintf with non-standard version. The original rounds .5 values the wrong way (2.5 becomes 2, -2.5 becomes -2), is larger, and is slower.