Pixel-Composer/scripts/real_comparison/real_comparison.gml

11 lines
320 B
Plaintext
Raw Normal View History

2022-11-22 14:25:39 +01:00
function isEqual(val1, val2) {
if(!is_array(val1) && !is_array(val2)) return val1 == val2;
if(is_array(val1) ^ is_array(val2)) return false;
if(array_length(val1) != array_length(val2)) return false;
2023-07-25 20:12:40 +02:00
for( var i = 0, n = array_length(val1); i < n; i++ ) {
2022-11-22 14:25:39 +01:00
if(val1[i] != val2[i]) return false;
}
return true;
}