Slick Forums
http://slick.ninjacave.com/forum/

RFE: Shape.transform() speedup by removing unnecesery safety
http://slick.ninjacave.com/forum/viewtopic.php?f=4&t=2880
Page 1 of 1

Author:  Kova [ Thu Dec 09, 2010 6:54 pm ]
Post subject:  RFE: Shape.transform() speedup by removing unnecesery safety

Hello,

for transform various Shapes use
Code:
public void transform(float source[], int sourceOffset, float destination[], int destOffset, int numberOfPoints)

which uses safety so you can have same destination and source, but at a performance loss as noted by this comment
Code:
        //TODO performance can be improved by removing the safety to the destination array


Since simple Shape.transform() guarantees that it won't change existing shape but create a new one, this safety is now redundant and can be removed.

Author:  kevglass [ Wed Mar 09, 2011 1:59 pm ]
Post subject: 

Resolved in SVN.

Kev

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/