… | … | ||
---|---|---|---|
186 | int32_t d = b - a; | 186 | int32_t d = b - a; |
187 | d &= d >> 31; | 187 | d &= d >> 31; |
188 | return b - d; | 188 | return b - d; |
189 | } | 189 | } |
190 | 190 | ||
191 | // this is much faster than crossfires original algorithm | 191 | // this is much faster than crossfire's original algorithm |
192 | // on modern cpus | 192 | // on modern cpus |
193 | inline int | 193 | inline int |
194 | isqrt (int n) | 194 | isqrt (int n) |
195 | { | 195 | { |
196 | return (int)sqrtf ((float)n); | 196 | return (int)sqrtf ((float)n); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |