1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-09-19 20:14:58 +00:00

Implemented _D2R, _R2D.

This commit is contained in:
William Barnes 2022-04-26 20:33:35 -04:00
parent f12cef7bfb
commit b233809f6c

8
qb.js
View file

@ -167,6 +167,10 @@ var QB = new function() {
return (Math.exp(x)+Math.exp(-x))/2;
};
this.func__D2R = function(x) {
return x*Math.PI/180;
};
this.sub__Delay = async function(seconds) {
await GX.sleep(seconds*1000);
};
@ -413,6 +417,10 @@ var QB = new function() {
}
}
this.func__R2D = function(x) {
return x*180/Math.PI;
};
this.func__Red = function(rgb, imageHandle) {
// TODO: implement corresponding logic when an image handle is supplied (maybe)
return _color(rgb).r;