fix Vec.Normal to rotate by pi/2, not -pi/2
This commit is contained in:
parent
977f5710f5
commit
c57e3dca1b
|
@ -112,7 +112,7 @@ func (u Vec) Rotated(angle float64) Vec {
|
|||
|
||||
// Normal returns a vector normal to u. Equivalent to u.Rotated(math.Pi / 2), but faster.
|
||||
func (u Vec) Normal() Vec {
|
||||
return Vec{u.Y, -u.X}
|
||||
return Vec{-u.Y, u.X}
|
||||
}
|
||||
|
||||
// Dot returns the dot product of vectors u and v.
|
||||
|
|
Loading…
Reference in New Issue