4 Platform::Platform(Linha aline
, bool pass
, double r
, double g
, double b
): line(aline
), passable(pass
) {
10 void Platform::desenha() {
14 double Platform::angle() {
15 double x1
= line
.vertices
[0].x
, x2
= line
.vertices
[1].x
,
16 y1
= line
.vertices
[0].y
, y2
= line
.vertices
[1].y
;
17 double size
= sqrt((x1
-x2
)*(x1
-x2
) + (y1
-y2
)*(y1
-y2
));
20 return asin(abs(y2
-y1
)/size
);