How to make rotation calculations work for more than one rotation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sininenblue
$Sprite.flip_h = abs(grapple_collider.rotation) > (PI/2)

How would I make this work for more than 1 rotation, I just want the player to flip when his arms rotate

:bust_in_silhouette: Reply From: Jayman2000

Use modulo.

$Sprite.flip_h = abs(fmod(grapple_collider.rotation, TAU)) > (PI/2)