Support mathutils.Vector.rotate of 2D vectors by 2x2 matrices.
- Added a "special case" check for when the vector has size = 2 and the matrix is 2x2.
- Rotation of 2D vectors by Euler or Quaternion remain invalid, since it's not an operation as "well defined" as with a 2x2 matrix.
- Implemented Matrix.to_3x3 and Matrix.to_4x4 for 2x2 matrices as well (currently it raises a "inappropriate matrix size" ValueError).
Also, by allowing 2x2 matrices to be "casted", we can have the same result of v.rotate(m) when using v.resize_3d(); v.rotate(m.to_3x3()); v.resize_2d(), e.g.:
m = Matrix.Rotation(radians(90), 2) v0 = Vector((1.0, 0.5)) v1 = Vector((1.0, 0.5)) v2 = Vector((1.0, 0.5)) v1.rotate(m) v2.resize_3d() v2.rotate(m.to_3x3()) v2.resize_2d() assert v1 == v2 assert v2 == m @ v0 # calling v.rotate(m) is equivalent to m @ v, and not v @ m assert m @ v0 != v0 @ m # m @ v will generally be different from v @ m, as it is in this case