MLIB
Loading...
Searching...
No Matches
point.h File Reference

Definition of Point template class. More...

#include <math.h>
#include <ostream>

Go to the source code of this file.

Data Structures

struct  mlib::point_traits< T >
 
struct  mlib::point_traits< int >
 
class  mlib::Point< T >
 Generic 2D point. More...
 

Typedefs

typedef Point< double > mlib::dpoint
 Specialization of Point using double as underlining type.
 

Functions

template<class T >
Point< T > mlib::operator* (double scalar, const Point< T > &p)
 Scalar multiplication function makes scalar multiplication commutative.
 
template<class T >
double mlib::abs (const Point< T > &p)
 Alias for magnitude function.
 
template<class T >
std::ostream & mlib::operator<< (std::ostream &s, const Point< T > &p)
 

Detailed Description

Definition of Point template class.

(c) Mircea Neacsu 2017

Function Documentation

◆ operator<<()

template<class T >
std::ostream & mlib::operator<< ( std::ostream &  s,
const Point< T > &  p 
)

Serializes a point to an output stream as a comma-separated pair of values in brackets