Class NonMutatingVectorRotator

java.lang.Object
org.skriptlang.skript.bukkit.misc.rotation.NonMutatingVectorRotator
All Implemented Interfaces:
Rotator<org.bukkit.util.Vector>

public class NonMutatingVectorRotator extends Object implements Rotator<org.bukkit.util.Vector>
Rotates Vectors around the X, Y, and Z axes, as well as any arbitrary axis. Does not support local axes. Returns new vector objects rather than mutating the input vector.
  • Constructor Details

    • NonMutatingVectorRotator

      public NonMutatingVectorRotator(Rotator.Axis axis, double angle)
    • NonMutatingVectorRotator

      public NonMutatingVectorRotator(Rotator.Axis axis, org.bukkit.util.Vector vector, double angle)
  • Method Details

    • rotate

      @Contract("_ -> new") public org.bukkit.util.Vector rotate(org.bukkit.util.Vector input)
      Description copied from interface: Rotator
      Rotates the input around the rotator's axis by the rotator's angle. May modify the input.
      Specified by:
      rotate in interface Rotator<org.bukkit.util.Vector>