public class Vector2d extends Object
Constructor and Description |
---|
Vector2d(Coord2d p1,
Coord2d p2)
Create a vector, described by two coordinates.
|
Vector2d(float x1,
float y1,
float x2,
float y2)
Create a vector, described by two points.
|
Modifier and Type | Method and Description |
---|---|
float |
dot(Vector2d v)
Compute the dot product between and current and given vector.
|
float |
norm()
Compute the norm of this vector.
|
Coord2d |
vector()
Return the vector induced by this set of coordinates.
|
public Vector2d(float x1, float y1, float x2, float y2)
public Coord2d vector()
public float dot(Vector2d v)
v
- input vectorpublic float norm()
Copyright © 2016. All rights reserved.