Class Vec2

java.lang.Object
gaiasky.util.noise.Vec2

public class Vec2 extends Object
Simple 2D vector class mirroring GLSL's vec2.
  • Field Details

    • x

      public final double x
    • y

      public final double y
  • Constructor Details

    • Vec2

      public Vec2(double x, double y)
  • Method Details

    • add

      public Vec2 add(Vec2 other)
    • sub

      public Vec2 sub(Vec2 other)
    • mul

      public Vec2 mul(double scalar)
    • dot

      public double dot(Vec2 other)
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object