Changed name from reflect to reflected
need to match naming convention of the other methods
This commit is contained in:
parent
28ed959ef7
commit
04972adaf3
|
@ -371,8 +371,8 @@ func (m Matrix) Rotated(around Vec, angle float64) Matrix {
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reflect reflects everything around a given point by the given angle in radians
|
//Reflected reflects everything around a given point by the given angle in radians
|
||||||
func (m Matrix) Reflect(around pixel.Vec, angle float64) pixel.Matrix {
|
func (m Matrix) Reflected(around pixel.Vec, angle float64) pixel.Matrix {
|
||||||
sin2t, cos2t := math.Sincos(2 * angle)
|
sin2t, cos2t := math.Sincos(2 * angle)
|
||||||
m[4], m[5] = m[4]-around.X, m[5]-around.Y
|
m[4], m[5] = m[4]-around.X, m[5]-around.Y
|
||||||
m = m.Chained(pixel.Matrix{cos2t, sin2t, sin2t, -cos2t, 0, 0})
|
m = m.Chained(pixel.Matrix{cos2t, sin2t, sin2t, -cos2t, 0, 0})
|
||||||
|
|
Loading…
Reference in New Issue