ID:1973450
 
Not a bug
BYOND Version:509.1311
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 46.0.2490.71
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary: When attempting to turn an atom say, 180 degrees, like so:

var matrix/m = new
m.Turn(180)
animate(atom, transform = m, time = 10)


...the atom does this weird warp action, growing very small before returning to its normal size with the applied rotation.

Also, in the case of doing a 360 degree rotation, the animation simply doesn't play.

Occurs in version 509.1307.

Expected Results: A smooth animated rotation applied to the atom.

Actual Results: A weird warping animation, as if the size of the atom is being changed, when it isn't.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes; successfully reproduced it in a test project.
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur? It doesn't.

Kaiochao resolved issue (Not a bug)
...Not a bug? What is the reason for this?

The warping is beyond ugly and I don't see it being used by most if it's going to remain that way.

Edit: I actually don't remember it doing this a while back.
matrix.Interpolate():
Whenever possible, DM will interpolate by doing scaling and/or shearing first, then rotation, then translation. This is done by trying to find the angle of rotation of each matrix first; a rotation of 180° is counted as a flip rather than a rotation.
A rotation by 180° is equal to Scale(-1, -1) when you do the math.

As for the 360° rotation, the rotation matrix is mathematically equal to the identity matrix, so interpolation naturally doesn't happen. It's equivalent to multiplying a number by 1.
In response to Kaiochao
Understood.
If you want an atom to spin 360°, you'll need its animation to have at least 3 steps. Rotating by N and then returning to null will just ping-pong the rotation angle, since it always seeks the smallest angle to move by. Rotating to N and then to -N and then to null will work, as long as N > 90.