div
Divides two Vectors component-wise.
Example:
val v1 = Vector(10.0, 20.0, 30.0)
val v2 = Vector(2.0, 4.0, 5.0)
val result = v1 / v2 // Vector(5.0, 5.0, 6.0)Content copied to clipboard
Return
A new Vector with component-wise quotient
Parameters
other
The Vector to divide by
Divides all components of the Vector by a scalar value.
Example:
val v = Vector(10.0, 20.0, 30.0)
val result = v / 2.0 // Vector(5.0, 10.0, 15.0)Content copied to clipboard
Return
A new Vector with all components divided
Parameters
other
The scalar value to divide each component by
Divides this Location's coordinates component-wise by a Vector.
Example:
val loc = Location(world, 10.0, 20.0, 30.0)
val vec = Vector(2.0, 4.0, 5.0)
val result = loc / vec // Location at (5.0, 5.0, 6.0)Content copied to clipboard
Return
A new Location with component-wise division
Parameters
vector
The Vector to divide by
Divides this Location's coordinates component-wise by another Location.
Example:
val loc1 = Location(world, 10.0, 20.0, 30.0)
val loc2 = Location(world, 2.0, 4.0, 5.0)
val result = loc1 / loc2 // Location at (5.0, 5.0, 6.0)Content copied to clipboard
Return
A new Location with component-wise division
Parameters
other
The Location to divide by
Divides 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 (5.0, 10.0, 15.0)Content copied to clipboard
Return
A new Location with all coordinates divided
Parameters
other
The scalar value to divide all coordinates by