This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animcurve_copy_channel(src, dst) { | |
static __animcurve_copy_channel = function(n, src, dst) { | |
gml_pragma("forceinline"); | |
var i = -1; repeat(n) { ++i; | |
dst.points[i].value = src.points[i].value; | |
dst.points[i].posx = src.points[i].posx; | |
} | |
} | |
var n = array_length(src.points); | |
var m = array_length(dst.points); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generate_uuid4_string() { | |
//As per https://www.cryptosys.net/pki/uuid-rfc4122.html | |
//FIXME - Do this without random()/choose() calls | |
var _UUID = sha1_string_utf8(string(current_time) + string(date_current_datetime()) + string(random(0xFFFFFF))); | |
_UUID = string_set_byte_at(_UUID, 9, 0x2D) | |
_UUID = string_set_byte_at(_UUID, 14, 0x2D) | |
_UUID = string_set_byte_at(_UUID, 19, 0x2D) | |
_UUID = string_set_byte_at(_UUID, 24, 0x2D) | |
_UUID = string_delete(_UUID, 37, 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static float cosLookup[360] { | |
1.000000f, | |
0.999848f, | |
0.999391f, | |
0.998630f, | |
0.997564f, | |
0.996195f, | |
0.994522f, | |
0.992546f, | |
0.990268f, |