1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-09-28 06:27:47 +00:00

Additional parameter assertion fixes

This commit is contained in:
boxgaming 2024-08-13 09:10:54 -05:00
parent a945cdbeed
commit 185d53907b

10
qb.js
View file

@ -138,6 +138,10 @@ var QB = new function() {
return result;
};
this.toBoolean = function(value) {
return value ? 0 : -1;
};
// Process control methods
// -------------------------------------------
this.halt = function() {
@ -1057,8 +1061,6 @@ var QB = new function() {
this.func__RGBA = function(r, g, b, a) {
_assertNumber(r, 1);
_assertNumber(g, 2);
_assertNumber(b, 3);
if (a == undefined) {
a = 255;
}
@ -1353,10 +1355,10 @@ var QB = new function() {
}
this.sub_Color = function(fg, bg) {
if (x != undefined) {
if (fg != undefined) {
_fgColor = _color(fg);
}
if (y != undefined) {
if (bg != undefined) {
_bgColor = _color(bg);
}
};