#sqrt #alghorithm

quake-inverse-sqrt

A rust implementation of the Quake Inverse Square root alghorithm

4 releases

0.1.3 May 26, 2022
0.1.2 May 23, 2022
0.1.1 May 23, 2022
0.1.0 May 23, 2022

#1492 in Math

GPL-3.0-only

15KB
74 lines

A simple rust implementation of the Quake III reverse square root alghorithm.

Safety

The main trait implementations are not marked as unsafe. However, given that std::mem::transmute is used under the hood undefined behaviour is always a possibility.

The library guarantees, however, that needed conversions are done between equally sized types.

No runtime deps