fromDegree static method

KannaRotateType fromDegree(
  1. int degree
)

Implementation

static KannaRotateType fromDegree(int degree) {
  switch (degree) {
    case 0:
      return KannaRotateType.deg0;
    case 90:
      return KannaRotateType.deg90;
    case 180:
      return KannaRotateType.deg180;
    case 270:
      return KannaRotateType.deg270;
    default:
      throw ArgumentError('not supported');
  }
}