samesami Posted December 20, 2022 Share Posted December 20, 2022 How do i write function that can override it variables like the &prim and &uv in xyzdist. float xyzdist(<geometry>geometry, vector origin, int &prim, vector &uv) float myProcess(float &space; float sideBar ) { float space=1; space = 15 * sideBar; } Quote Link to comment Share on other sites More sharing options...
haggi Posted December 20, 2022 Share Posted December 20, 2022 Since vex uses a call by reference way to call functions you do not need to do anything, just overwrite the values: float bla(vector a; float b) { a = set(1,2,3); b = 0.123; return 1.0; } vector tst = set(9,8,7); float ff = .987; bla(tst, ff); printf("tst %f ff %f", tst, ff); The printf should print the values overwritten in the bla() function. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.