// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals real array test_vs_x real array test_vs_y real array test_vs_z real vec3_trim_return_x=0. endglobals function initGlobals takes nothing returns nothing endfunction function foo takes integer x returns integer if x > 0 then return x else return - x endif endfunction function vec3_trim takes real this_x, real this_y, real this_z, real value returns real set this_y = this_x if this_x > ( - value) and this_x < value then set this_y = 0. endif set vec3_trim_return_x = this_y return vec3_trim_return_x endfunction function init_test takes nothing returns nothing local integer tempIndex set test_vs_x[0] = 3. set test_vs_y[0] = 15. set test_vs_z[0] = 4. set tempIndex = foo(3) call vec3_trim(test_vs_x[tempIndex], test_vs_y[tempIndex], test_vs_z[tempIndex], foo(4) * 1.) endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction