This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josh Puckett
Posted Feb 27 - Read on Facebook

I wrote a quick function to determine the angle of a touch gesture on a given view. Check it out!


Rasmus Andersson

I'm curious why you're using a constant switch statement instead of if...else's?

Josh Puckett

Rasmus: I initially had another variable that returned direction (up, down, left, right), and began with using switch to evaluate for that, but when simplifying for this Gist dropped the direction variable but kept the switch. I believe functionally they do basically the same thing, even if a bit nonstandard.

Fredrik Ampler

Strong your Trigonometry is! </yoda>

Read the entire post on Facebook