Recent topics
Recent Comments 
cos() in Math Expression doesn't seem to work; JS does?Hey, this might be some kind of shortsightedness on my part but I tracked down a bug today to what seems to be an incorrectly (non) functioning cos() in the Math Expression patch. In the info for the patch it seems to suggest that cos() should be supported and the code highlighting works, but it doesn't give the right output, at least here. I've attached a comp with both JS versions and ME versions of the same formula. You can switch between them and see that the ME one does not compute.
More like this

Your math is wrong  one expects degrees, the other radians.
If you put the following in for Mathematical expression, they're essentially the same:
c/2 * (cos(180*t/d)  1) + b
Thanks,
I realize now too, that I could have found that with a search; I never dreamed that the functions would be defined differently in the two patches BTW, is there a particular "language" or spec for the Math Expression patch then? A reference one can turn to?
This is a general opportunity for improvement I see in Quartz Composer — being able to know what type of units (and expected range) each port of a patch accepts.
Generally it's in the (limited) docs but, no, it's not available via the GUI with a mouseover or anything like that. Patch descriptions are pretty brief too for new users.