fromDegrees static method

UCameraOrientation fromDegrees(
  1. int degrees
)

Implementation

static UCameraOrientation fromDegrees(int degrees) {
  switch (((degrees % 360) + 360) % 360) {
    case 90:
      return UCameraOrientation.landscapeRight;
    case 180:
      return UCameraOrientation.portraitDown;
    case 270:
      return UCameraOrientation.landscapeLeft;
    default:
      return UCameraOrientation.portraitUp;
  }
}