Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
floating_point_threshold< Key > Class Template Reference

Compares two floating point numbers, within threshold of equivalence. More...

`#include "stl_compares.h"`

## Public Member Functions
| floating_point_threshold (Key threshold=get_nearly_zero_value((Key) 0))
bool | operator() (const Key &a, const Key &b) const
| Returns true if a sorts before b, false otherwise.

## Public Attributes
const Key | _threshold

## Detailed Description

template<class Key>
class floating_point_threshold< Key >

Compares two floating point numbers, within threshold of equivalence.

Definition at line 60 of file stl_compares.h.

## Constructor & Destructor Documentation

## ◆ floating_point_threshold()

template<class Key>

floating_point_threshold< Key >::floating_point_threshold | ( | Key | threshold = get_nearly_zero_value((Key)0) | ) |
| inline

Definition at line 18 of file stl_compares.I.

## Member Function Documentation

## ◆ operator()()

template<class Key>

bool floating_point_threshold< Key >::operator() | ( | const Key & | a,
|  | const Key & | b ) const
| inline

Returns true if a sorts before b, false otherwise.

Definition at line 28 of file stl_compares.I.

## Member Data Documentation

## ◆ _threshold

template<class Key>

const Key floating_point_threshold< Key >::_threshold

Definition at line 64 of file stl_compares.h.

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

- dtool/src/dtoolbase/stl_compares.h
- dtool/src/dtoolbase/stl_compares.I