public void setPosition(float[] position) {
            if (Float.isNaN(position[0]) || Float.isNaN(position[1])) {
                throw new RuntimeException("Position is NaN");
            }
            this.position = position;
        }