public class Vec2f extends Object
| Constructor and Description |
|---|
Vec2f() |
Vec2f(float x,
float y) |
Vec2f(Vec2f arg) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Vec2f b)
this = this + b
|
void |
add(Vec2f a,
Vec2f b)
this = a + b
|
Vec2f |
addScaled(float s,
Vec2f arg)
Returns this + s * arg; creates new vector
|
void |
addScaled(Vec2f a,
float s,
Vec2f b)
this = a + s * b
|
Vec2f |
copy() |
float |
dot(Vec2f arg) |
float |
get(int i)
Gets the ith component, 0 <= i < 2
|
float |
length() |
float |
lengthSquared() |
Vec2f |
minus(Vec2f arg)
Returns this - arg; creates new vector
|
void |
normalize() |
Vec2f |
plus(Vec2f arg)
Returns this + arg; creates new vector
|
void |
scale(float val)
this = this * val
|
void |
set(float x,
float y) |
void |
set(int i,
float val)
Sets the ith component, 0 <= i < 2
|
void |
set(Vec2f arg) |
void |
setX(float x) |
void |
setY(float y) |
void |
sub(Vec2f b)
this = this - b
|
void |
sub(Vec2f a,
Vec2f b)
this = a - b
|
Vec2f |
times(float val)
Returns this * val; creates new vector
|
String |
toString() |
Vecf |
toVecf() |
float |
x() |
float |
y() |
public Vec2f()
public Vec2f(Vec2f arg)
public Vec2f(float x,
float y)
public Vec2f copy()
public void set(Vec2f arg)
public void set(float x,
float y)
public void set(int i,
float val)
public float get(int i)
public float x()
public float y()
public void setX(float x)
public void setY(float y)
public float dot(Vec2f arg)
public float length()
public float lengthSquared()
public void normalize()
public Vec2f times(float val)
public void scale(float val)
public void add(Vec2f b)
public void sub(Vec2f b)
public Vecf toVecf()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.