Exponent operator

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Exponent operator

Post by MURTUMA » 12 Oct 2016 18:37

I'm trying to convert following function to a format AM would understand. I can't seem to get exponent operator right.

How do I use pow() function correctly?

"-(x-240)^2/460+255"

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Exponent operator

Post by Martin » 12 Oct 2016 19:14

pow(base, exponent) should work:
val = -pow(x-240, 2)/460+255;

Regards,
Martin

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Exponent operator

Post by MURTUMA » 12 Oct 2016 20:33

Thanks. The problem seemed to be a wrong order of placement

Post Reply