Skip to content

Instantly share code, notes, and snippets.

@AndreVero
Created February 27, 2024 13:55
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/9a8c3fae55c083ad786f98cd5ed35595 to your computer and use it in GitHub Desktop.
Save AndreVero/9a8c3fae55c083ad786f98cd5ed35595 to your computer and use it in GitHub Desktop.
Drag variables
// current drag angle
var angle by remember { mutableStateOf(0f) }
// start angle of a new drag
var dragStartedAngle by remember { mutableStateOf(0f) }
// variable in which we will need to calculate difference between old drag position and new
var oldAngle by remember { mutableStateOf(angle) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment