.. # split from OEMathFunctions.rst:252

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DDistance2

.. oe:function:: OEGeom3DDistance2

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

      .. oe:api::

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

   .. oe:language:: python

      .. oe:api:: python

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

   Returns the square of the Euclidean distance between the two
   cartesian points, ``p`` and ``q``. When it is possible to use 
   the square of the distance, this is more efficient than 
   using :oe:func:`OEMath::OEGeom3DDistance`.

