Class FloatN.FactorView

All Implemented Interfaces:
FloatElements, FloatN, Vector
Direct Known Subclasses:
Float2.FactorView, Float3.FactorView, Float4.FactorView
Enclosing interface:
FloatN

public abstract static class FloatN.FactorView extends FloatN.View implements FloatN
  • Field Details

    • factor

      protected final float @NotNull [] factor
  • Constructor Details

    • FactorView

      protected FactorView(@NotNull @NotNull FloatN original, int @NotNull [] mapping, float @NotNull [] factor)
  • Method Details

    • get

      public float get(int index)
      Description copied from interface: FloatN
      Get component at position index.
      Specified by:
      get in interface FloatN
      Overrides:
      get in class FloatN.View
      Parameters:
      index - index of the vector component to get
      Returns:
      component value
    • put

      public void put(int index, float value)
      Description copied from interface: FloatN
      Set component at position index to value.
      Specified by:
      put in interface FloatN
      Overrides:
      put in class FloatN.View
      Parameters:
      index - index of the vector component to set
      value - value to set
    • hasFactor

      public boolean hasFactor()
      Overrides:
      hasFactor in class FloatN.View
      Returns:
      true if this view has a factor when getting/setting values.
    • getFactor

      public float @NotNull [] getFactor()
      Description copied from class: Vector.View
      The factor for each component. The factor[i] is used for the i-component of this view vector, not on the original.
      The returned array will always be of the same type as the vector (FloatN -> float[], ...).
      Overrides:
      getFactor in class FloatN.View
      Returns:
      factor array