rem

operator fun Vector.rem(other: Double): Vector

Calculates the modulo of all components with a scalar value.

Example:

val v = Vector(10.0, 15.0, 20.0)
val result = v % 7.0 // Vector(3.0, 1.0, 6.0)

Return

A new Vector with modulo applied to all components

Parameters

other

The scalar value to calculate modulo with


operator fun Location.rem(other: Location): Location

Calculates the modulo of this Location's coordinates component-wise with another Location.

Example:

val loc1 = Location(world, 10.0, 15.0, 20.0)
val loc2 = Location(world, 7.0, 6.0, 8.0)
val result = loc1 % loc2 // Location at (3.0, 3.0, 4.0)

Return

A new Location with component-wise modulo

Parameters

other

The Location to calculate modulo with