Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | 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

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.