Jump to content

implicit cast vector to float? [solved]


evanrudefx

Recommended Posts

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

vtof.PNG

Edited by ejr32123
Link to comment
Share on other sites

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 1
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 by ejr32123
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...