App.Rotation = Ember.Mixin.create
  rotateLeft: ->
    new_rotation = -90 + @get('rotation')
    new_rotation += 360 if new_rotation < 0
    @set 'rotation', new_rotation
  rotateRight: ->
    new_rotation = 90 + @get('rotation')
    new_rotation -= 360 if new_rotation >= 360
    @set 'rotation', new_rotation
