mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 03:11:08 +01:00
17 lines
317 B
Plaintext
17 lines
317 B
Plaintext
class Ground {
|
|
float x1, y1, x2, y2;
|
|
float x, y, len, rot;
|
|
|
|
// Constructor
|
|
Ground(float x1, float y1, float x2, float y2) {
|
|
this.x1 = x1;
|
|
this.y1 = y1;
|
|
this.x2 = x2;
|
|
this.y2 = y2;
|
|
x = (x1+x2)/2;
|
|
y = (y1+y2)/2;
|
|
len = dist(x1, y1, x2, y2);
|
|
rot = atan2((y2-y1), (x2-x1));
|
|
}
|
|
}
|