Skip to content

Commit 208dc2f

Browse files
MaxGraeydcodeIO
authored andcommitted
Implement Mathf.sin/cos/tan (AssemblyScript#491)
1 parent 8e5b9c7 commit 208dc2f

File tree

7 files changed

+29030
-20067
lines changed

7 files changed

+29030
-20067
lines changed

std/assembly/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,12 +1401,18 @@ interface IMath<T> {
14011401
}
14021402

14031403
interface INativeMath<T> extends IMath<T> {
1404+
/** Contains sin value produced after Math/Mathf.sincos */
1405+
sincos_sin: T;
1406+
/** Contains cos value produced after Math/Mathf.sincos */
1407+
sincos_cos: T;
14041408
/** Seeds the random number generator. */
14051409
seedRandom(value: i64): void;
14061410
/** Returns the floating-point remainder of `x / y` (rounded towards zero). */
14071411
mod(x: T, y: T): T;
14081412
/** Returns the floating-point remainder of `x / y` (rounded to nearest). */
14091413
rem(x: T, y: T): T;
1414+
/** Returns sin and cos simultaneously for same angle. Results stored to `sincos_s32/64` and `sincos_c32/64` globals */
1415+
sincos(x: T): void;
14101416
}
14111417

14121418
/** Double precision math imported from JavaScript. */

0 commit comments

Comments
 (0)