Krion Posted January 23, 2019 Share Posted January 23, 2019 Hey! I am new to programming, but i would like to know something. I have two lines of who the length is copied by reference, i want one line b to be of 75% of line a. I have accomplished this by selecting a point of line two in a wrangle and typing: @P.x = @P.x * 0.75; But now i want line b to stop when it hits 0.75, while the length of line a continues to increase. I have tried to do this by typing: while (@P.x == 0.75){ @P.x = 0.75; } But that doesn't work. How is this done? Thanks. Quote Link to comment Share on other sites More sharing options...
anim Posted January 23, 2019 Share Posted January 23, 2019 something like this maybe? @P.x = min(@P.x, 0.75); this will not allow any of the points to be further in X than 0.75 so as your line is expanding it will not go past 0.75 in X 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted January 23, 2019 Author Share Posted January 23, 2019 Yeah that works.. Thank you. 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.