Jump to content

Getting the wrong math results, but why?


Recommended Posts

Hi guys, this is causing me some problems. Houdini is calculating this math incorrectly, and I don't understand why.

In the hscript textport I get the following

echo `2*cos($PI/6)`

1.99992

but if I do the same thing on a regular calculator, then I get the correct value

2*cos(PI/6) == 1.73

Why on earth is Houdini calculating this wrong? and can anyone else reproduce this problem?

Link to comment
Share on other sites

Are the trig functions in Houdini calculated as Radian or Degree? I have always just assumed they are radians, though I have not used them all that much either. That will be some major knowledge for me eventually as I try to apply some of my math concepts to various parts of the program.

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...