Skip to content

Comment on The "most hated" CSS feature: cos() and sin()

Comments

It's a shame that sin and cos get lumped in with all the other trigonometry that you don't need to know, because the two basic formulas are incredibly useful and easy to learn:

x = distance * cos(angle)

y = distance * sin(angle)

Screw the rest. I learnt these as a kid writing a 2D computer game years before coming across them in high school maths.

Nah, the rest is pretty great aswell. Lest you go to gamedev hell by saying you dislike atan2

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.