Changeset 103:c51d75904a48 in rrlib_geometry


Ignore:
Timestamp:
29.12.2020 07:36:50 (18 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds '==' and '!=' operators to tLineSegment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tLineSegment.h

    r82 r103  
    141141typedef tLineSegment<3, double> tLineSegment3D; 
    142142 
     143 
     144template <size_t Tdimension, typename TElement> 
     145bool operator==(const tLineSegment<Tdimension, TElement> &lhs, const tLineSegment<Tdimension, TElement> &rhs) 
     146{ 
     147  return lhs.Begin() == rhs.Begin() && lhs.End() == rhs.End(); 
     148} 
     149 
     150template <size_t Tdimension, typename TElement> 
     151bool operator!=(const tLineSegment<Tdimension, TElement> &lhs, const tLineSegment<Tdimension, TElement> &rhs) 
     152{ 
     153  return !(lhs == rhs); 
     154} 
     155 
    143156//---------------------------------------------------------------------- 
    144157// Explicit template instantiation 
Note: See TracChangeset for help on using the changeset viewer.