Page 1 of 1

Include math function in BricxCC for NXT

Posted: 22 May 2012, 16:31
by userschneider
Hello, I habe a newbie question that you might laugh about. I wrote my first NXC program for NXT Mindstorms with BricxCC and wanted to use a math function like tan.
I get the error "ndefined Identifier tan" what tells me I habe to include math functions. But where do I get them? The help function of NXC tells about float atan ( float x ) but the example program ex_atan.nxc
does not work.

Can anyone give a hand?

Best regards, Uli

Re: Include math function in BricxCC for NXT

Posted: 22 May 2012, 18:51
by h-g-t
atan is the arctangent, you need a similar program but just tan, not atan.

Re: Include math function in BricxCC for NXT

Posted: 23 May 2012, 22:43
by spillerrec
Nearly all of the mathematical functions requires the enhanced firmware. So you have to make sure you are compiling for the enhanced firmware (which you are not) and that you have the enhanced firmware installed on your NXT. (Newer versions of BCC might auto detect your firmware and compile accordingly, but I'm not sure...)