[boskid] util.rotateposition bug

This subforum contains all the issues which we already resolved.
Natha
Filter Inserter
Filter Inserter
Posts: 253
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

[boskid] util.rotateposition bug

Post by Natha »

util.rotate_position() has unintended behaviour. When rotating the vector {0, -4} (whch is pointing north) to 0.25 (east), I'd expect the result being {4, 0}, but it is returning {-4, 0}.
I think the problem might be due to the inverted y axis. When assuming cartesian coordinates where y values increase to the top (north), the result is correct, but in Factorio y values increase to the south.

Another small improvement request is to allow named x, y keys for the position in util.moveposition().
Also please allow orientation values in math2d.position.rotate_vector().
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3753
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid] util.rotateposition bug

Post by boskid »

Thanks for the report. util.rotate_position is now fixed for 2.0.43.
Post Reply

Return to “Resolved Problems and Bugs”