Back to index

salome-med  6.5.0
Public Member Functions
INTERP_KERNEL::AngleLess Class Reference

Function that compares two angles from the values of the pairs (sin,cos) More...

#include <InterpolationUtils.hxx>

List of all members.

Public Member Functions

bool operator() (std::pair< double, double >theta1, std::pair< double, double > theta2)

Detailed Description

Function that compares two angles from the values of the pairs (sin,cos)

Angles are considered in [0, 2Pi] bt are not computed explicitely

Definition at line 708 of file InterpolationUtils.hxx.


Member Function Documentation

bool INTERP_KERNEL::AngleLess::operator() ( std::pair< double, double >  theta1,
std::pair< double, double >  theta2 
) [inline]

Definition at line 711 of file InterpolationUtils.hxx.

    {
      double norm1 = sqrt(theta1.first*theta1.first +theta1.second*theta1.second);
      double norm2 = sqrt(theta2.first*theta2.first +theta2.second*theta2.second);
      
      double epsilon = 1.e-12;
      
      if( norm1 < epsilon || norm2 < epsilon  ) 
        std::cout << "Warning InterpolationUtils.hxx: AngleLess : Vector with zero norm, cannot define the angle !!!! " << std::endl;
      
      return theta1.second*(norm2 + theta2.first) < theta2.second*(norm1 + theta1.first);
    
    }

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