Interface Vec.Operator

Enclosing class:
Vec
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Vec.Operator
A functional interface representing an operation on the components of a Vec.
  • Field Details

  • Method Details

    • operator

      static Vec.Operator operator(DoubleUnaryOperator operator)
      Shortcut utility to apply the operator on all 3 components.
      Parameters:
      operator - the unary operator to use
      Returns:
      the vector operator
    • apply

      Vec apply(double x, double y, double z)
      Applies the operator to the given x, y, z components.
      Parameters:
      x - the x component
      y - the y component
      z - the z component
      Returns:
      the resulting vector