View Single Post
  #2   Spotlight this post!  
Unread 22-01-2012, 16:28
Spex_guy's Avatar
Spex_guy Spex_guy is offline
Java Master
AKA: Martin Wickham
FRC #2220
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2008
Location: Minnesota
Posts: 4
Spex_guy is an unknown quantity at this point
Re: Dist/Speed Function Question.

There are two ways of doing this. If you can determine a mathematical function, use that. Otherwise, try this:
Code:
final double[] SPEED = {double1, double2, double3...};
The reason your compiler didn't like the line you posted is because of syntax. It should have looked like this:
Code:
double[] SPEED = new double[SIZE];
I don't recommend using an ArrayList as they use a lot more memory than you need and they require objects, not primitives.
Reply With Quote