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:
parent
f12cef7bfb
commit
b233809f6c
1 changed files with 8 additions and 0 deletions
8
qb.js
8
qb.js
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue