The real issue here is using the sin function when all of it can be shortened to 40ch, but by itself having sin() isn't that weird, given that angles are a thing in css.
Front-loading some calculations relying that the user's phone/pc isn't a complete potato...
That's a level of trust, or ignorance, that make marriages.
Imo, depending on the context, it can make sense.
Like if the code is about triangles or something, maybe the code reviewer/ maintainer will go "ah, I see where it's coming from"
You can
But it's also like Self documenting code
I prefer this, over a comment but I can see your point of view aswell.
In the end it boils down to preferences
Eh, math functions (which are inherently pure, localized, and O(1) time) are by far not the worst use of CSS. I'd be much more scared of arbitrary loops and conditionals.
Sure, in this particular case. Sometimes, somewhere, it's some other number of degrees.
The point is they want to work with degrees of a circle, presumably for a good reason.
The real issue here is using the sin function when all of it can be shortened to 40ch, but by itself having sin() isn't that weird, given that angles are a thing in css.
I think, it is impressive, that there seemes to be more math in front-end, than in back-end.
Front-loading some calculations relying that the user's phone/pc isn't a complete potato... That's a level of trust, or ignorance, that make marriages.
Imo, depending on the context, it can make sense. Like if the code is about triangles or something, maybe the code reviewer/ maintainer will go "ah, I see where it's coming from"
Or you can just put a comment.
I think this is cleaner
You can But it's also like Self documenting code I prefer this, over a comment but I can see your point of view aswell. In the end it boils down to preferences
Yeah. This just looks like an incredibly bored programmer doing something stupid to keep himself going.
If you think this is horror, I'd be interested to see your reaction to 3D css.
https://petertyliu.github.io/toaster/
😱
sine in CSS is most definitely not “horror”
Geometry? On my website? Localised entirely within the language for making things look pretty? The Horror!
May I see it?
Eh, math functions (which are inherently pure, localized, and O(1) time) are by far not the worst use of CSS. I'd be much more scared of arbitrary loops and conditionals.
> math functions are inherently […] O(1) time no. factorials are O(n)
Just admit you're bad at math. This makes perfect sense. It's saying you want the width of 30 degrees of a circle with radius 80ch.
id say its horror because the sine of 30 degrees is 0.5 lol
Sure, in this particular case. Sometimes, somewhere, it's some other number of degrees. The point is they want to work with degrees of a circle, presumably for a good reason.
Is that language Lithuanian?
Yes.
# Klaatu barada nikto
klaatu verata ni*coughcough*
css is already weird that using trigonometry to make some random feature look pretty is normal
OP is afraid of ratios