Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Related Functions

Related functions for Simd::Point structure. More...

Functions

template<typename T >
bool operator== (const Point< T > &p1, const Point< T > &p2)
 Compares two points on equality. More...
 
template<typename T >
bool operator!= (const Point< T > &p1, const Point< T > &p2)
 Compares two points on inequality. More...
 
template<typename T >
Point< T > operator+ (const Point< T > &p1, const Point< T > &p2)
 Adds two points. More...
 
template<typename T >
Point< T > operator- (const Point< T > &p1, const Point< T > &p2)
 Subtracts two points. More...
 
template<typename T >
Point< T > operator* (const Point< T > &p1, const Point< T > &p2)
 Multiplies two points. More...
 
template<typename T >
Point< T > operator/ (const Point< T > &p1, const Point< T > &p2)
 Divides two points. More...
 
template<typename T >
Point< T > operator- (const Point< T > &p)
 Returns point with coordinates with the opposite sign. More...
 
template<typename TP , typename TA >
Point< TP > operator/ (const Point< TP > &p, const TA &a)
 Divides the point on the scalar value. More...
 
template<typename TP , typename TA >
Point< TP > operator* (const Point< TP > &p, const TA &a)
 Multiplies the point on the scalar value. More...
 
template<typename TP , typename TA >
Point< TP > operator* (const TA &a, const Point< TP > &p)
 Multiplies the scalar value on the point. More...
 
template<typename T >
SquaredDistance (const Point< T > &p1, const Point< T > &p2)
 Gets squared distance between two points. More...
 
template<typename T >
double Distance (const Point< T > &p1, const Point< T > &p2)
 Gets distance between two points. More...
 
template<typename T >
DotProduct (const Point< T > &p1, const Point< T > &p2)
 Gets dot product of two points. More...
 
template<typename T >
CrossProduct (const Point< T > &p1, const Point< T > &p2)
 Gets cross product of two points. More...
 

Detailed Description

Related functions for Simd::Point structure.

Function Documentation

◆ operator==()

template< typename T > bool operator== ( const Point< T > &  p1,
const Point< T > &  p2 
)

Compares two points on equality.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of comparison.

◆ operator!=()

template< typename T > bool operator!= ( const Point< T > &  p1,
const Point< T > &  p2 
)

Compares two points on inequality.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of comparison.

◆ operator+()

template< typename T > Point< T > operator+ ( const Point< T > &  p1,
const Point< T > &  p2 
)

Adds two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of addition.

◆ operator-() [1/2]

template< typename T > Point< T > operator- ( const Point< T > &  p1,
const Point< T > &  p2 
)

Subtracts two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of subtraction.

◆ operator*() [1/3]

template< typename T > Point< T > operator* ( const Point< T > &  p1,
const Point< T > &  p2 
)

Multiplies two points.

Note
Coordinates of the points are multiplied independently.
Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of multiplication.

◆ operator/() [1/2]

template< typename T > Point< T > operator/ ( const Point< T > &  p1,
const Point< T > &  p2 
)

Divides two points.

Note
Coordinates of the points are divided independently.
Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a result of division.

◆ operator-() [2/2]

template< typename T > Point< T > operator- ( const Point< T > &  p)

Returns point with coordinates with the opposite sign.

Parameters
[in]p- an original point.
Returns
a result of the operation.

◆ operator/() [2/2]

template< typename TP, typename TA > Point< TP > operator/ ( const Point< TP > &  p,
const TA &  a 
)

Divides the point on the scalar value.

Parameters
[in]p- a point.
[in]a- a scalar value.
Returns
a result of division.

◆ operator*() [2/3]

template< typename TP, typename TA > Point< TP > operator* ( const Point< TP > &  p,
const TA &  a 
)

Multiplies the point on the scalar value.

Parameters
[in]p- a point.
[in]a- a scalar value.
Returns
a result of multiplication.

◆ operator*() [3/3]

template< typename TP, typename TA > Point< TP > operator* ( const TA &  a,
const Point< TP > &  p 
)

Multiplies the scalar value on the point.

Parameters
[in]a- a scalar value.
[in]p- a point.
Returns
a result of multiplication.

◆ SquaredDistance()

template< typename T > T SquaredDistance ( const Point< T > &  p1,
const Point< T > &  p2 
)

Gets squared distance between two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a squared distance between them.

◆ Distance()

template< typename T > double Distance ( const Point< T > &  p1,
const Point< T > &  p2 
)

Gets distance between two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a distance between them.

◆ DotProduct()

template< typename T > T DotProduct ( const Point< T > &  p1,
const Point< T > &  p2 
)

Gets dot product of two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a dot product.

◆ CrossProduct()

template< typename T > T CrossProduct ( const Point< T > &  p1,
const Point< T > &  p2 
)

Gets cross product of two points.

Parameters
[in]p1- a first point.
[in]p2- a second point.
Returns
a cross product.