Merge branch 'moverfixes'
This commit is contained in:
commit
3d64a3f866
|
@ -44,7 +44,7 @@ public class HalfEllipseMover extends Mover {
|
||||||
@Override
|
@Override
|
||||||
public double[] getPointAt(int time) {
|
public double[] getPointAt(int time) {
|
||||||
double Tangle = Math.PI * getT(time) * dir;
|
double Tangle = Math.PI * getT(time) * dir;
|
||||||
double x = middlex + Math.cos(Tangle) * radius * mod; // TODO fix this
|
double x = middlex + Math.cos(Tangle) * radius;
|
||||||
double y = middley + Math.sin(Tangle) * radius * mod;
|
double y = middley + Math.sin(Tangle) * radius * mod;
|
||||||
double dx = middlex - x;
|
double dx = middlex - x;
|
||||||
double dy = middley - y;
|
double dy = middley - y;
|
||||||
|
@ -55,7 +55,7 @@ public class HalfEllipseMover extends Mover {
|
||||||
|
|
||||||
return new double[] {
|
return new double[] {
|
||||||
middlex - Math.cos(my) * d,
|
middlex - Math.cos(my) * d,
|
||||||
middley - Math.sin(my) * d
|
middley + Math.sin(my) * d
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ public class QuartCircleMover extends Mover {
|
||||||
|
|
||||||
public QuartCircleMover(GameObject start, GameObject end, int dir) {
|
public QuartCircleMover(GameObject start, GameObject end, int dir) {
|
||||||
super(start, end, dir);
|
super(start, end, dir);
|
||||||
middlex = (startX - endX) / 2d;
|
middlex = (startX + endX) / 2d;
|
||||||
middley = (startY - endY) / 2d;
|
middley = (startY + endY) / 2d;
|
||||||
radius = Utils.distance(middlex, middley, startX, startY);
|
radius = Utils.distance(middlex, middley, startX, startY);
|
||||||
ang = Math.atan2(startY - middley, startX - middlex) + Math.PI / 2d * dir;
|
ang = Math.atan2(startY - middley, startX - middlex) + Math.PI / 2d * dir;
|
||||||
middlex = middlex + Math.cos(ang) * radius;
|
middlex = middlex + Math.cos(ang) * radius;
|
||||||
|
@ -45,7 +45,7 @@ public class QuartCircleMover extends Mover {
|
||||||
|
|
||||||
return new double[] {
|
return new double[] {
|
||||||
middlex + Math.cos(ang) * radius,
|
middlex + Math.cos(ang) * radius,
|
||||||
middlex + Math.sin(ang) * radius
|
middley + Math.sin(ang) * radius
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user