NXC Trig functions aren't working...

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
thegenie
Posts: 8
Joined: 16 Jul 2011, 20:05

NXC Trig functions aren't working...

Post by thegenie »

Well I have nxtcc up an running on a Mac! :D
Problem is, the trig functions don't work. Cos(90) should be 0, but my NXT is telling me that it's -0.4481. Also, Sin(45) should be .707, but my NXT is pretty firm about it being 0.8509.
Is this just an NXTCC glitch? I know that it's still rough around the edges. Or could it be a FW problem? I'm running the newest test release of the BCC EFW.

Any insight would be greatly appreciated! Thanks! : )
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXC Trig functions aren't working...

Post by HaWe »

sin/cos is for radians, not for degrees :mrgreen:
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXC Trig functions aren't working...

Post by HaWe »

nevertheless, there's nothing supposed to be impossible for an Apple computer...
:mrgreen: :mrgreen:

(ok, that was nasty, use
sind(), cosd() instead)
8-)
thegenie
Posts: 8
Joined: 16 Jul 2011, 20:05

Re: NXC Trig functions aren't working...

Post by thegenie »

[facepalm]
How did I pass trig?

Thanks! XD
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest