Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How do I import Vector2D

4: Adsense

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   

456
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

 



#2 Bacterius   Members   

13164
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   

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