1.3 Points to remember

The position Vec2(0,0) always stands for the middle of the screen. But the borders are not always clear. Not every computer screen has the same size, but you probably want to know the border values are. For example, you want to draw something in the right corner of the screen. For this reason, Esenthel provides a few functions in the object D (display). You can request the width of the screen with D.w() and the height of the screen with the function D.h(). This makes it very easy to calculate the next points:

 
Vec2 middle(0,0); 
Vec2 left(-D.w(), 0); 
Vec2 right(D.w(), 0); 
Vec2 rightUpperCorner(D.w(), D.h()); 
5Vec2 leftUpperCorner(-D.w(), D.h());  

If you’d like to draw a point at a distance of 0.1 from the left upper corner, you could do that like this:

 
Vec2(-D.w() + 0.1, D.h() - 0.1).draw(PINK);