Files
3DChess/app/src/main/java/chess/view/DDDrender/DDDPlacement.java
2025-04-24 11:12:53 +02:00

20 lines
456 B
Java

package chess.view.DDDrender;
import org.joml.Vector2f;
import chess.model.Coordinate;
class DDDPlacement {
static public Vector2f coordinates_to_vector(Coordinate coo) {
// float newX = switch (x) {
// case 0 -> -1 + 0.125f;
// case 1 -> -1 + 0.375f;
// case 2 -> -1 + 0.625f;
// case 3 -> -1 + 0.875f;
// default -> 0;
// };
return new Vector2f(-1.0f + 0.125f + coo.getX() * 0.250f, -1.0f + 0.125f + coo.getY() * 0.250f);
}
}