Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ squared_distance() [3/11]

template<typename Scal1 , typename Scal2 , require_all_stan_scalar_t< Scal1, Scal2 > * = nullptr, require_all_not_var_t< Scal1, Scal2 > * = nullptr>
return_type_t< Scal1, Scal2 > stan::math::squared_distance ( const Scal1 &  x1,
const Scal2 &  x2 
)
inline

Returns the squared distance.

Template Parameters
Scal1Type of the first scalar.
Scal2Type of the second scalar.
Parameters
x1First scalar.
x2Second scalar.
Returns
Squared distance between scalars
Exceptions
std::domain_errorAny scalar is not finite.

Definition at line 26 of file squared_distance.hpp.