@@ -206,10 +206,18 @@ globalScope["isFloat"] = function isFloat(arg) {
206206 return typeof arg === "number" ;
207207} ;
208208
209+ globalScope [ "isNullable" ] = function isNullable ( arg ) {
210+ return true ;
211+ }
212+
209213globalScope [ "isReference" ] = function isReference ( arg ) {
210214 return typeof arg === "object" || typeof arg === "string" ;
211215} ;
212216
217+ globalScope [ "isFunction" ] = function isFunction ( arg ) {
218+ return typeof arg === "function" ;
219+ }
220+
213221globalScope [ "isString" ] = function isString ( arg ) {
214222 return typeof arg === "string" || arg instanceof String ;
215223} ;
@@ -244,9 +252,22 @@ globalScope["fmodf"] = function fmodf(x, y) {
244252} ;
245253
246254globalScope [ "JSMath" ] = Math ;
247- globalScope [ "JSMath" ] . signbit = function signbit ( x ) {
248- F64 [ 0 ] = x ; return Boolean ( ( U64 [ 1 ] >>> 31 ) & ( x == x ) ) ;
249- }
255+
256+ Object . defineProperties ( globalScope [ "JSMath" ] , {
257+ sincos_sin : { value : 0.0 , writable : true } ,
258+ sincos_cos : { value : 0.0 , writable : true } ,
259+ signbit : {
260+ value : function signbit ( x ) {
261+ F64 [ 0 ] = x ; return Boolean ( ( U64 [ 1 ] >>> 31 ) & ( x == x ) ) ;
262+ }
263+ } ,
264+ sincos : {
265+ value : function sincos ( x ) {
266+ this . sincos_sin = Math . sin ( x ) ;
267+ this . sincos_cos = Math . cos ( x ) ;
268+ }
269+ }
270+ } ) ;
250271
251272globalScope [ "memory" ] = ( ( ) => {
252273 var HEAP = new Uint8Array ( 0 ) ;
0 commit comments