(angle float32)
| 227 | } |
| 228 | |
| 229 | func (point Vector) Rotate(angle float32) Vector { |
| 230 | x := point.X |
| 231 | y := point.Y |
| 232 | point.X = x*float32(math.Cos(float64(angle))) - y*float32(math.Sin(float64(angle))) |
| 233 | point.Y = x*float32(math.Sin(float64(angle))) + y*float32(math.Cos(float64(angle))) |
| 234 | return point |
| 235 | } |
| 236 | |
| 237 | func (point Vector) Negated() Vector { |
| 238 | return Vector{-point.X, -point.Y} |
no outgoing calls
no test coverage detected