To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2553
    RE: Converting a float to an integer —Michael Marklew
   I have built a plotter and want to draw a diagonal line of varying angles. It requires one motor to run slower then the other at a ratio based on the distance it has to travel compared to the other one. So I do something like this xspeed = (int) (...) (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
   
        Re: Converting a float to an integer —Benton Jackson
   It looks like xdist and ydist are integers. You divide an integer by an integer, the answer is an integer. For example, if xdist=5 and ydist=10, you have 5/10, the answer is 0 (with a remainder of 5). So, if you do the multiply first, you will be (...) (22 years ago, 13-May-02, to lugnet.robotics.rcx.legos)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR