emlabcpp
modern opinionated embedded C++ library
emlabcpp::point< N > Class Template Reference

Class implementing multidimensional point in coordinate system of dimension N. More...

#include <point.h>

+ Inheritance diagram for emlabcpp::point< N >:
+ Collaboration diagram for emlabcpp::point< N >:

Public Member Functions

constexpr point< N > & operator+= (vector< N > const &other)
 += operator adds value of 'i'th coordinate from 'other' to 'this', for all 0 <= i < N More...
 
constexpr point< N > & operator-= (vector< N > const &other)
 -= operator subtracts value of 'i'th coordinate of 'other' from 'this', for all 0 <= i < N More...
 
 ~point ()=default
 
- Public Member Functions inherited from emlabcpp::vec_point_base< point< N >, N >
constexpr vec_point_base () noexcept=default
 
constexpr vec_point_base (container cont) noexcept
 
constexpr vec_point_base (T... t)
 
constexpr const_iterator begin () const
 
constexpr iterator begin ()
 
constexpr const_iterator end () const
 
constexpr iterator end ()
 
constexpr float operator[] (std::size_t i) const
 
constexpr float & operator[] (std::size_t i)
 
constexpr point< N > operator- () const
 
constexpr std::size_t size () const
 
constexpr container const & operator* () const
 

Additional Inherited Members

- Public Types inherited from emlabcpp::vec_point_base< point< N >, N >
using container = std::array< float, N >
 
using value_type = float
 
using const_iterator = typename container::const_iterator
 
using iterator = typename container::iterator
 
- Static Public Member Functions inherited from emlabcpp::vec_point_base< point< N >, N >
static point< N > make_filled_with (value_type val)
 
- Static Public Attributes inherited from emlabcpp::vec_point_base< point< N >, N >
static constexpr std::size_t dimensions
 

Detailed Description

template<std::size_t N>
class emlabcpp::point< N >

Class implementing multidimensional point in coordinate system of dimension N.

Constructor & Destructor Documentation

◆ ~point()

template<std::size_t N>
emlabcpp::point< N >::~point ( )
default

Member Function Documentation

◆ operator+=()

template<std::size_t N>
constexpr point< N >& emlabcpp::point< N >::operator+= ( vector< N > const &  other)
inlineconstexpr

+= operator adds value of 'i'th coordinate from 'other' to 'this', for all 0 <= i < N

References emlabcpp::N, and emlabcpp::range().

◆ operator-=()

template<std::size_t N>
constexpr point< N >& emlabcpp::point< N >::operator-= ( vector< N > const &  other)
inlineconstexpr

-= operator subtracts value of 'i'th coordinate of 'other' from 'this', for all 0 <= i < N

References emlabcpp::N, and emlabcpp::range().


The documentation for this class was generated from the following file: