evanrudefx Posted July 2, 2019 Share Posted July 2, 2019 (edited) Hey! I am trying to delete geometry by comparing two vectors. For some reason (also it only seems to compare the first dimension in the vector rather then each value) I keep getting a implicit cast (vector to float) error even though I am comparing two vectors. How does that make any sense? Do I have to compare the individual values rather a the vector as a whole? Thanks in advance edit: Also v@test I set to {2,2,2}, but some areas have {2,2,0.5}. If thres is {2,2,1} shouldn't areas with {2,2,0.5} get deleted? because {2,2,0.5} < {2,2,1}? Evan Edited July 2, 2019 by ejr32123 Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted July 2, 2019 Share Posted July 2, 2019 AFAIK there's no vector comparison in vex. What you are doing is just comparing the first element of the vector. Depending on your needs you can use length to get the magnitude of the vector and compare them instead. Either that or you can write your own function to compare the vectors in a way that suits your needs. 2 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted July 2, 2019 Author Share Posted July 2, 2019 46 minutes ago, vtrvtr said: AFAIK there's no vector comparison in vex. What you are doing is just comparing the first element of the vector. Depending on your needs you can use length to get the magnitude of the vector and compare them instead. Either that or you can write your own function to compare the vectors in a way that suits your needs. Thanks so much! That would make sense. Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted July 2, 2019 Author Share Posted July 2, 2019 (edited) I just saw this in the manual: The comparison operators (==, !=, <, <=, >, >=) are defined when the left hand of the operator is the same type as the right hand side, for string, float and integer types only. The operations result in integer types. @vtrvtr you are 100% right Edited July 2, 2019 by ejr32123 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.