К
Size: a a a
DS
DS
AS
DS
e
ОС
ОС
ОС
Q
ДШ
p.yx*vec2(1,-1)
dot(x, x)
чтобы получить квадрат длины вектора.AV
p.yx*vec2(1,-1)
dot(x, x)
чтобы получить квадрат длины вектора.ДШ
A
p.yx*vec2(1,-1)
dot(x, x)
чтобы получить квадрат длины вектора.
Fast 90-degree rotation
Using the above 2d rotation formula you can replace those nasty cos(a) and sin(a) with constant values for a 90 degree rotation.
cs = cos(90) = 0
sn = sin(90) = 1
x' = (x * cs) - (y * sn)
y' = (x * sn) + (y * cs)
which is,
x' = (x * 0) - (y * 1)
y' = (x * 1) + (y * 0)
which gives:
x' = - (y * 1)
y' = (x * 1)
and is:
x' = - y
y' = x
ΔΒ
Fast 90-degree rotation
Using the above 2d rotation formula you can replace those nasty cos(a) and sin(a) with constant values for a 90 degree rotation.
cs = cos(90) = 0
sn = sin(90) = 1
x' = (x * cs) - (y * sn)
y' = (x * sn) + (y * cs)
which is,
x' = (x * 0) - (y * 1)
y' = (x * 1) + (y * 0)
which gives:
x' = - (y * 1)
y' = (x * 1)
and is:
x' = - y
y' = x
A
p.yx*vec2(1,-1)
dot(x, x)
чтобы получить квадрат длины вектора.ДШ