kokumaji / warrior-plugin

1 stars 0 forks source link

Move Calculation of Region Center to Constructor #1

Closed kokumaji closed 3 years ago

kokumaji commented 3 years ago

Is your feature request related to a problem? Right now, the center point calculation of a Region object is done within the Region#center() method. While this may be acceptable, this code is not optimal and should ideally be executed once within the constructor.

Below is an example on how much this method impacts performance. This method may take up to 300 micro seconds at worse, 0-1 micro seconds being when the code isn't executed.

image