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

◆ distance() [2/3]

template<typename T1 , typename T2 , require_all_stan_scalar_t< T1, T2 > * = nullptr>
return_type_t< T1, T2 > stan::math::distance ( const T1 &  x1,
const T2 &  x2 
)
inline

Returns the distance between two scalars.

Template Parameters
T1type of first scalar.
T2type of second scalar
Parameters
x1First scalar.
x2Second scalar.
Returns
Distance between two scalars
Exceptions
std::domain_errorIf the arguments are not finite.

Definition at line 27 of file distance.hpp.