diff --git a/geometry.go b/geometry.go index 299c835871c6c64024f5d0355c6c50e3cafbb47d..76c112662f56517fa5ef2f09e414a74840b09a7a 100644 --- a/geometry.go +++ b/geometry.go @@ -281,6 +281,8 @@ func (m Matrix) Rotated(around Vec, angle float64) Matrix { } // Project applies all transformations added to the Matrix to a vector u and returns the result. +// +// Time complexity is O(1). func (m Matrix) Project(u Vec) Vec { m3 := mgl64.Mat3(m) proj := m3.Mul3x1(mgl64.Vec3{u.X(), u.Y(), 1}) @@ -288,6 +290,8 @@ func (m Matrix) Project(u Vec) Vec { } // Unproject does the inverse operation to Project. +// +// Time complexity is O(1). func (m Matrix) Unproject(u Vec) Vec { m3 := mgl64.Mat3(m) inv := m3.Inv()