.. # split from OEMathFunctions.rst:92

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom2DDistance2

.. oe:function:: OEGeom2DDistance2

   .. oe:language:: c++ java csharp

      .. oe:api::

         template<class T>
         double OEGeom2DDistance2(const T* p, const T* q)

   .. oe:language:: python

      .. oe:api:: python

         OEGeom2DDistance2(p: OEFloatArray, q: OEFloatArray) -> float
         OEGeom2DDistance2(p: OEDoubleArray, q: OEDoubleArray) -> float

   Determines the squared distance in two dimensions between ``p`` and ``q``.
   When it is possible to use the square of the distance, this is more
   efficient than using :oe:func:`OEMath::OEGeom2DDistance`.

   *p*
      First two dimensional input array.

   *q*
      Second two dimensional input array.

