Normalize this vector. @return this
()
| 600 | * @return this |
| 601 | */ |
| 602 | public Vec2 normalize() { |
| 603 | double length = Math.sqrt((x * x) + (y * y)); |
| 604 | x /= length; |
| 605 | y /= length; |
| 606 | return this; |
| 607 | } |
| 608 | |
| 609 | /** |
| 610 | * Normalize this vector and store the result in <code>dest</code>. |
no outgoing calls
no test coverage detected