invsqrt()
This commit is contained in:
parent
6505399faf
commit
38693e243c
1
minetest-api.d.ts
vendored
1
minetest-api.d.ts
vendored
@ -1749,6 +1749,7 @@ declare global {
|
|||||||
// And this (required to D/Java style float to int truncation)
|
// And this (required to D/Java style float to int truncation)
|
||||||
function truncate(floating: number): number;
|
function truncate(floating: number): number;
|
||||||
function fma(x: number, y: number, z: number): number;
|
function fma(x: number, y: number, z: number): number;
|
||||||
|
function invsqrt(r: number): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace string {
|
namespace string {
|
||||||
|
@ -60,4 +60,8 @@ namespace utility {
|
|||||||
return (x * y) + z;
|
return (x * y) + z;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
math.invsqrt = function (r: number): number {
|
||||||
|
return 1.0 / sqrt(r);
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user