1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Modulo Block for NXT version 2.0

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.

Modulo Block for NXT version 2.0

Postby gavilanp » 24 Sep 2012, 22:12

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.
gavilanp
 
Posts: 2
Joined: 24 Sep 2012, 22:05

Re: Modulo Block for NXT version 2.0

Postby h-g-t » 25 Sep 2012, 11:50

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.
h-g-t
 
Posts: 548
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Modulo Block for NXT version 2.0

Postby hassenplug » 25 Sep 2012, 12:48

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 --->
User avatar
hassenplug
 
Posts: 346
Joined: 27 Sep 2010, 03:05

Re: Modulo Block for NXT version 2.0

Postby gavilanp » 26 Sep 2012, 14:39

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.
gavilanp
 
Posts: 2
Joined: 24 Sep 2012, 22:05


Return to Mindstorms Software

Who is online

Users browsing this forum: No registered users and 0 guests

cron