Change default values

This commit is contained in:
GreenComfyTea
2023-08-09 16:08:27 +03:00
parent a100932a02
commit b805d88205
6 changed files with 37 additions and 18 deletions

View File

@@ -41,6 +41,7 @@ local is_empty;
local unicode_map;
local unicode_relative_position;
local unicode_chars;
local epsilon = 0.000001;
this.table = {};
this.number = {};
@@ -51,6 +52,11 @@ this.vec4 = {};
this.math = {};
this.unicode = {};
this.constants = {};
this.constants.uninitialized_int = -420;
this.constants.uninitialized_string = "Uninitialized";
this.constants.epsilon = epsilon;
function this.table.tostring(table_)
if type(table_) == "number" or type(table_) == "boolean" or type(table_) == "string" then
return tostring(table_);
@@ -225,6 +231,14 @@ function this.number.is_even(value)
return value % 2 == 0;
end
function this.number.is_equal(value1, value2)
if math.abs(value1 - value2) < epsilon then
return true;
end
return false;
end
function this.string.trim(str)
return str:match("^%s*(.-)%s*$");
end