Question: public final class Vector2 extends java.lang.Object public final class Vector2 { private double x; private double y; private String name; public Vector2 multiply (double s)
-
public final class Vector2 extends java.lang.Object
- public final class Vector2 { private double x; private double y; private String name;


public Vector2 multiply (double s) Multiply this vector by a scalar amount changing the components of this vector. a and assigning Mathematically, if this vector is a and the scalor is s then invoking this method is equivalent to computing s * the value back to a. Parameters: s - the scalar value to multiply the vector by Returns: this Vector2D object public static Vector2 multiply(double s, Vector2 a) Returns a new Vector2Dequal to s * a. Parameters: a scalar a vector Returns: a new Vector2D equal to s a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
