public class Force
extends java.lang.Object
| Constructor and Description |
|---|
Force()
Construct a zero force.
|
Force(double x,
double y)
Construct a Force with given components.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(double x,
double y)
Add to this force.
|
void |
add(Force... forces)
Add some other forces to this force.
|
void |
clear()
Zero this force.
|
double |
getX()
Get the X component of this force.
|
double |
getY()
Get the Y component of this force.
|
public Force()
public Force(double x,
double y)
x - The X component of this force.y - The Y component of this force.public double getX()
public double getY()
public void add(double x,
double y)
x - The amount to add to the X component.y - The amount to add to the Y component.public void add(Force... forces)
forces - The forces to add.public void clear()