Division by Zero in VEX is defined

   1660   1   0
User Avatar
Member
2038 posts
Joined: Sept. 2015
Offline
Not really a question..just an observation.

Was writing some code and noticed by accident I had a division by 0 in my code.

Because such an operation is typically undefined I was wondering why my hip didn't crash when I ran it.

I certainly don't want to turn this into an RFE…but it seems I can take advantage of the fact that any situation in vex in which there is a division by zero, that houdini will default to 0.
User Avatar
Member
8549 posts
Joined: July 2007
Online
Yes, just take an advantage of that

However always be aware of whether your code will possibly divide by 0 and if so whether 0 is an acceptable result, to avoid any surprises
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links