Post Reply 
Programming Challenge!
02-20-2017, 10:52 PM (This post was last modified: 02-20-2017 10:55 PM by toml_12953.)
Post: #4
RE: Programming Challenge!
(02-20-2017 04:39 PM)Han Wrote:  After a quick glance at the BASIC code, I wondered if you may be better off looping on L from 1 to 125 (or 126?) and then calculating T to be T:=T+0.2; or T:=L/5. This avoids having to round off with IP().

That's true but since I was trying to stay as close as possible to the original, I opted to keep the same looping. I also wrote a much better version that uses an algebraic technique rather than this iterative solution. It's much shorter and more accurate but I didn't use it for the same reason as above.

  RETURN -16*T^2+V*T;

  OMODE:=HAngle; //Save current angle mode
  HAngle:=1; // Set degree mode
  PRINT(TAB(9)+"0   +");

  HAngle:=OMODE; // Reset original angle mode


Tom L

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Programming Challenge! - toml_12953 - 02-19-2017, 10:35 PM
RE: Programming Challenge! - Han - 02-20-2017, 04:39 PM
RE: Programming Challenge! - toml_12953 - 02-20-2017 10:52 PM

User(s) browsing this thread: 1 Guest(s)