TransformRotation2D

Author: Jessy

Description
Quaternions are overkill for rotations if you're working in 2D. These extension methods allow you to represent Transform rotations around an axis of your choosing (Z by default) with just a float.

Usage
Either add this stuff to your already-existing Transform extension class, or copy and paste the whole thing into a C# script named TransformExtensions. By default, you work with it using world space, and the XY plane, but you can use the optional parameters if you want to work with local space, or other planes. The angles are in radians; make other extension methods that call these ones, after converting from degrees to radians, if you like.