public class Vector2D extends Object
Constructor and Description |
---|
Vector2D(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
Vector2D |
add(Vector2D other) |
Vector2D |
cwNormal()
The normal vector of same size in clock wise direction.
|
double |
dotProduct(Vector2D other) |
boolean |
equals(Object obj) |
static Vector2D |
fromTo(Point2D a,
Point2D b) |
double |
getX() |
double |
getY() |
int |
hashCode() |
double |
length() |
Vector2D |
scale(double scale) |
String |
toString() |
Vector2D |
toUnitVector() |
public double getX()
public double getY()
public Vector2D toUnitVector()
public double length()
public Vector2D scale(double scale)
public double dotProduct(Vector2D other)
public Vector2D cwNormal()
Copyright © 2018. All rights reserved.