times
Multiplies two Vectors component-wise.
Example:
val v1 = Vector(2.0, 3.0, 4.0)
val v2 = Vector(5.0, 6.0, 7.0)
val result = v1 * v2 // Vector(10.0, 18.0, 28.0)Content copied to clipboard
Return
A new Vector with component-wise product
Parameters
other
The Vector to multiply by
Multiplies all components of the Vector by a scalar value.
Example:
val v = Vector(1.0, 2.0, 3.0)
val result = v * 3.0 // Vector(3.0, 6.0, 9.0)Content copied to clipboard
Return
A new Vector with all components scaled
Parameters
other
The scalar value to multiply each component by
Multiplies this Location's coordinates component-wise with a Vector.
Example:
val loc = Location(world, 10.0, 20.0, 30.0)
val vec = Vector(2.0, 3.0, 4.0)
val result = loc * vec // Location at (20.0, 60.0, 120.0)Content copied to clipboard
Return
A new Location with component-wise multiplication
Parameters
vector
The Vector to multiply by
Multiplies this Location's coordinates component-wise with another Location.
Example:
val loc1 = Location(world, 10.0, 20.0, 30.0)
val loc2 = Location(world, 2.0, 3.0, 4.0)
val result = loc1 * loc2 // Location at (20.0, 60.0, 120.0)Content copied to clipboard
Return
A new Location with component-wise multiplication
Parameters
other
The Location to multiply by
Multiplies all coordinates of this Location by a scalar value.
Example:
val loc = Location(world, 10.0, 20.0, 30.0)
val result = loc * 2.0 // Location at (20.0, 40.0, 60.0)Content copied to clipboard
Return
A new Location with all coordinates scaled
Parameters
other
The scalar value to multiply all coordinates by