Package org

Class Vector2d

java.lang.Object
org.Vector2d

public class Vector2d
extends Object
Author:
Christian Klukas
  • Field Details

    • x

      public double x
    • y

      public double y
  • Constructor Details

    • Vector2d

      public Vector2d​(double a, double b)
    • Vector2d

      public Vector2d​(Point2D position)
      Parameters:
      position -
    • Vector2d

      public Vector2d​(Vector2d position)
    • Vector2d

      public Vector2d​(Vector2d p1, Vector2d p2)
    • Vector2d

      public Vector2d​(Point2D p1, Point2D p2)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPoint2D

      public Point2D getPoint2D()
    • distance

      public double distance​(Vector2d point)
    • applyGrid

      public void applyGrid​(int xg, int yg)
    • minXY

      public double minXY()
    • maxXY

      public double maxXY()
    • distance

      public double distance​(double px, double py)
    • getOrthogonal

      public Vector2d getOrthogonal()
    • scale

      public Vector2d scale​(double scalingFactor)