invsqrt()

This commit is contained in:
jordan4ibanez 2024-04-19 04:39:54 -04:00
parent 6505399faf
commit 38693e243c
2 changed files with 5 additions and 0 deletions

1
minetest-api.d.ts vendored
View File

@ -1749,6 +1749,7 @@ declare global {
// And this (required to D/Java style float to int truncation)
function truncate(floating: number): number;
function fma(x: number, y: number, z: number): number;
function invsqrt(r: number): number;
}
namespace string {

View File

@ -60,4 +60,8 @@ namespace utility {
return (x * y) + z;
};
math.invsqrt = function (r: number): number {
return 1.0 / sqrt(r);
};
}