Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_numeric_springing

(view raw script w/o annotations or w/e)
1
var _ret;
2
function numeric_springing(argument0, argument1, argument2, argument3, argument4, argument5) //gml_Script_numeric_springing
3
{
4
    var _x = argument0
5
    var _v = argument1 * (room_speed / argument5)
6
    var _x_t = argument2
7
    var _damping = argument3
8
    var _ang_freq = (2 * pi) * argument4
9
    var _t = argument5 / room_speed
10
    var _delta = 1 + 2 * _t * _damping * _ang_freq + (power(_t, 2)) * (power(_ang_freq, 2))
11
    var _delta_x = (1 + 2 * _t * _damping * _ang_freq) * _x + _t * _v + (power(_t, 2)) * (power(_ang_freq, 2)) * _x_t
12
    var _delta_v = _v + _t * (power(_ang_freq, 2)) * (_x_t - _x)
13
    _ret[1] = _delta_v / _delta / (room_speed / argument5)
14
    _ret[0] = _delta_x / _delta
15
    return _ret;
16
}