Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 3:48 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: BUG: Vector2f
PostPosted: Thu Dec 04, 2008 4:52 am 
Offline

Joined: Thu Dec 04, 2008 4:21 am
Posts: 3
I believe I've found problem with Vector2f,
Code:

import org.newdawn.slick.geom.Transform;
import org.newdawn.slick.geom.Vector2f;

public class Test {

   public static void main(String[] args) {
            
      Vector2f x = new Vector2f(0,1);
      x.add(10);
      System.out.println(x);
      
      x = new Vector2f(1,0);
      x.setTheta(1);
      System.out.println(x);
      
      System.out.println(new Vector2f(1));
   }

}


comes up with
Code:
[Vector2f NaN,NaN (NaN)]
[Vector2f 0.9998477,Infinity (Infinity)]
[Vector2f 0.0,NaN (NaN)]


Which is not what I was expecting for a rotation...
Forgive me if I'm confused about the purpose of the functionality...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 9:26 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Agreed, looks fcked. Not sure what the deal is though - I'll take a look tonight (or at lunch time ;))

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 8:14 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I think it's right now, though I didn't write the original function so I'm not quite sure what it was trying to do :)

In SVN.

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group