Slick Forums

Discuss the Slick 2D Library
It is currently Thu May 23, 2013 6:56 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Feb 21, 2010 5:50 pm 
Offline
Regular
User avatar

Joined: Wed Apr 15, 2009 12:51 pm
Posts: 104
There is a big source of problems with Line.set(Vector2f start, Vector2f end):

Code:
   /**
    * Configure the line
    *
    * @param start The start point of the line
    * @param end The end point of the line
    */
   public void set(Vector2f start, Vector2f end) {
      super.pointsDirty = true;
      this.start = start;
      this.end = end;
      
      vec = new Vector2f(end);
      vec.sub(start);
      
      lenSquared = vec.lengthSquared();
   }


The Line should copy the vectors values not its references!

Code:
      this.start.set(start);
      this.end.set(end);



Thanks alot!
Greets Lufti


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 04, 2010 6:18 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Fixed in SVN. Thanks for the find.

Kev


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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