Forums > Javascript

Math.anything? in javascript object

April 25, 2011 | 7:52 am

I know the Math object is built into javascript, but I’d really like to believe that my patch keeps failing because my calls to Math.sin and Math.cos in my js object aren’t working. So I’m wondering do I need to put the math library in my patch folder and a call to it in the js file. Or is there something else wrong with my patch : (


April 25, 2011 | 8:09 am

in short-

Attachments:
  1. testfunction.js

April 25, 2011 | 1:23 pm

I didn’t look at your Max patch, but in your JavaScript, you use a "^" operator, which I’m guessing you intend as a "to the power of" operator. See instead Math.pow(x,y).


May 29, 2011 | 1:32 am

that fixed it. thanks christopher!


Viewing 4 posts - 1 through 4 (of 4 total)