What is the name of toroidal 2D space I have a 2D space of dimensions (X,Y) with toroidal properties :
In this space, when a point A(x,y) change it's position such as x is getting > X or &lt; 0, then x becomes (x % X).
So when the point reach the bottom of the space, it get back to the top.
And the same for y coordinate.

What is the name of such a space ?

I supposed it was toroidal space, but I can't find any resources with such terms.
As I said in the comments, this is indeed called torus or toroidal space when it comes to the topology. Even if the images suggest something 3 dimensional, this is just a visualization of the embedding of such a space in $\mathbb R^3$.

Regarding the distance between two points, I think you mean following: 
Just consider the coordinates $p=(x_1,y_1)$ and $q=(x_2,y_2)$ in the $[0,X)\times [0,Y) \simeq (\mathbb R / X\mathbb Z)\times (\mathbb R / Y\mathbb Z)$ square. Then define all the translations $q_i$ of $q$ :

$$
\begin{align*}
q_0 &amp;= (x_2\hphantom{+X\,\,\,},y_2\hphantom{+X\,\,\,})\\
q_1 &amp;= (x_2+X,y_2+Y)\\
q_2 &amp;= (x_2\hphantom{+X\,\,\,},y_2+Y)\\
q_3 &amp;= (x_2-X,y_2+Y)\\
q_4 &amp;= (x_2-X,y_2\hphantom{+X\,\,\,})\\
q_5 &amp;= (x_2-X,y_2-Y)\\
q_6 &amp;= (x_2\hphantom{+X\,\,\,},y_2-Y)\\
q_7 &amp;= (x_2+X,y_2-Y)\\
q_8 &amp;= (x_2+X,y_2\hphantom{+X\,\,\,})
\end{align*}$$

Then I think the distance you're looking for is

$$d(p,q) = \min_{i=0}^8 \Vert p-q_i \Vert$$