mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Re-adding Topics to SVN
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class Ground {
|
||||
float x1, y1, x2, y2;
|
||||
float x, y, len, rot;
|
||||
|
||||
// Default constructor
|
||||
Ground(){
|
||||
}
|
||||
|
||||
// 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user