Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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: 455

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: 11540

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).


“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


#3 SelethD   Members   -  Reputation: 455

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