rotateBy method

bool rotateBy(
  1. String id,
  2. double degrees
)

Rotates an object by degrees.

Implementation

bool rotateBy(String id, double degrees) {
  final object = objectById(id);
  if (object == null) return false;
  return setRotation(id, object.rotation + degrees);
}