Hey! Thanks for the feedback
On my first tutorial I did post the code, but the code viewer on Medium is a bit crappy; this way I can make it look a bit nicer, while referencing the GitHub repo as often as I can near the screenshots.
Taking out CGFloat would be good, I was trying to make everything as clear as possible but it might not be necessary there.
When I first tried just sin it was actually telling me that it only accepts Double and suggested sinf to me, I'll Double check that though (pun intended)