I have a method here that will either add or subtract the location to get to the set location that a person needs to get to if the box needs to move to the left it works great but if it needs to move to the right it doesn't seem to work I know there is a problem with it I just can't figure it out

```
    public void doMovements(float delta) {
    if (!movements.isEmpty()) {
        Vector2 vec = movements.get(0);

        if (pos.x > vec.x)
        pos.x -= VELOCITY * delta;
        else if (pos.x < vec.x)
        pos.x += VELOCITY * delta;

        System.out.println(pos.x);

        if (pos.x - vec.x < CLOSE_VEC) {
        movements.remove(movements.get(0));
        System.out.println(movements.size());
        }
    }

    rect.y = pos.y;
    rect.x = pos.x;
}

```

I need to get from point a to point b if the box has to move left it works perfectly but if it has to move right it breaks thanks for helping!