rotateAround wrong result

Description of the problem

The following code works:

new Vector2(100, 100).rotateAround(new Vector2(50, 50), MathUtils.degToRad(90))

and it returns:

Vector2 {x: 0, y: 100}

The following also works:

new Vector2(10, 10).rotateAround(new Vector2(5, 5), MathUtils.degToRad(90))

and it returns:

Vector2 {x: 0, y: 10}

But the following code…

new Vector2(1, 1).rotateAround(new Vector2(0.5, 0.5), MathUtils.degToRad(90))

…returns this:

Vector2 {x: 5.551115123125783e-17, y: 1}

I believe it should return the following:

Vector2 { x: 0, y: 1 }

The version I’m using is ^0.115.0

1 possible answer(s) on “rotateAround wrong result