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().
[boskid] util.rotateposition bug
Re: [boskid] util.rotateposition bug
Thanks for the report. util.rotate_position is now fixed for 2.0.43.