Vector2D.Magnitude 🌶️
Below is the definition of a Vector2D class, representing a two dimensional vector - an arrow pointing from the origin of an X-Y coordinate plane to some point in that plane. Its fields are a pair of x and y coordinates.
You will write an object method that finds the length (sometimes called the magnitude) of the vector.
You have the distance along the x axis and the distance along the y axis the vector is, and those form a right triangle with the vector itself. The Pythagorean Theorem can help you get the last leg of a right triangle if you know the two other ones, right?
Using the Pythagorean Theorem will involve squaring numbers and taking the square root of numbers. Check out the documentation on the Math.pow method in the javadoc!