Skip to content

Instantly share code, notes, and snippets.

@AndreVero
Last active April 15, 2024 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreVero/17287f88cf6ab3b365dabd7a970924d9 to your computer and use it in GitHub Desktop.
Save AndreVero/17287f88cf6ab3b365dabd7a970924d9 to your computer and use it in GitHub Desktop.
Adjust degress
// Adjust degrees to start item drawing from the top
private const val SELECTED_ANGLE_DEGREES = 180f
//...
val changeAngle = state.angle.toDouble() - SELECTED_ANGLE_DEGREES
//...
val itemAngle = changeAngle.degreesToRadians() + angleStep * index.toDouble()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment