SOHCAHTOA - just go back to school maths.
Sin = Opposite over Hypotenuse
So, Sin (angle) x Hypotenuse = Opposite
So, sin (angle between runway and wind) x total wind = crosswind component.
Quick check
=========
sin(0)=0, so no angle, no crosswind component.
sin(90)=1, so 90 degrees angle, it's all crosswind
sin(45)=0.70 (the clock code would use 75%, near enough)
sin(30)=0.5 (the clock code would use 50%, spot on).
And as just said above, Cos for head/tailwind components. Cos(0)=1, so it's all headwind, cos(90)=0, so if it's all crosswind there's no headwind.
Gusting winds are still just winds - apply the same factor, you get correct answers.
G