Gets the angle between this vector and another in radians. @param other The other vector @return angle in radians
(Vector other)
| 195 | * @return angle in radians |
| 196 | */ |
| 197 | public float angle(Vector other) { |
| 198 | double dot = dot(other) / (length() * other.length()); |
| 199 | |
| 200 | return (float) Math.acos(dot); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Sets this vector to the midpoint between this vector and another. |