Modulo Block for NXT version 2.0

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
gavilanp
Posts: 2
Joined: 24 Sep 2012, 22:05

Modulo Block for NXT version 2.0

Post by gavilanp »

With floating point math in the NXT software, it's no longer possible to compute modulo (no complaint about floating point ;) ).
Is there any available option for it, or an integer block which could then be used in a myblock to compute modulo.

thanks.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Modulo Block for NXT version 2.0

Post by h-g-t »

Don't know of any custom blocks, but I think all you have to do is carry out the division then subtract the original number to get the decimal bit.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Modulo Block for NXT version 2.0

Post by hassenplug »

You may want to look into how to install the integer blocks.

http://www.teamhassenplug.org/NXT/NXTGAdditions.html

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
gavilanp
Posts: 2
Joined: 24 Sep 2012, 22:05

Re: Modulo Block for NXT version 2.0

Post by gavilanp »

Steve, i put the integer math block on the palette and now i can compute modulo.

Thanks for pointing that to me, somehow I missed that although I had visited that page in my original search.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 8 guests