Jump to content

  • Log In with Google      Sign In   
  • Create Account

How do I import Vector2D


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 SelethD   Members   -  Reputation: 402

Like
0Likes
Like

Posted 27 January 2013 - 10:02 PM

I need to do some vector operations on a 2d Asteroids type game.

 

I found this page here.....

 

http://geom-java.sourceforge.net/api/math/geom2d/Vector2D.html

 

Unfortunately, I have no idea what to 'import' to get this to work.

 

I saw in an online example someone used the following....

 

import math.geom2d.Vector2D;

 

when I tried this, I only got....

 

error: package math.geom2d does not exist
import math.geom2d.Vector2D;

 

I am totally new to Java, and im not sure what I am doing wrong, other than there might be something I need to download extra?

And if so... how will others run my java app or applet if they too dont have the 'something' i might be missing?

 

Thanks for any help

 



Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 9267

Like
0Likes
Like

Posted 27 January 2013 - 10:41 PM

Yes, you need to download and install the geom-java package, as it is not part of the standard Java library. You should then be able to either state it as a requirement for future users, or perhaps even bundle it along with your java program (subject to conditions).


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 SelethD   Members   -  Reputation: 402

Like
0Likes
Like

Posted 28 January 2013 - 06:27 AM

ok, thank you so much.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS