Sign in to follow this  
SelethD

How do I import Vector2D

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this