Panda3D
|
This hash_compare class hashes a float or a double. More...
#include "stl_compares.h"
Public Member Functions | |
floating_point_hash (Key threshold=get_nearly_zero_value((Key) 0)) | |
size_t | add_hash (size_t start, const Key &key) const |
Adds the indicated key into a running hash. | |
size_t | operator() (const Key &key) const |
Computes a size_t hash from the float. | |
bool | operator() (const Key &a, const Key &b) const |
Returns true if a sorts before b, false otherwise. | |
Public Attributes | |
const Key | _threshold |
This hash_compare class hashes a float or a double.
Definition at line 159 of file stl_compares.h.
size_t floating_point_hash< Key >::add_hash | ( | size_t | start, |
const Key & | key | ||
) | const [inline] |
Adds the indicated key into a running hash.
Definition at line 180 of file stl_compares.I.
References AddHash::add_hash().
Referenced by AlphaTestAttrib::get_hash_impl(), AudioVolumeAttrib::get_hash_impl(), LightRampAttrib::get_hash_impl(), and RenderModeAttrib::get_hash_impl().
size_t floating_point_hash< Key >::operator() | ( | const Key & | key | ) | const [inline] |
Computes a size_t hash from the float.
Reimplemented from stl_hash_compare< Key >.
Definition at line 158 of file stl_compares.I.
bool floating_point_hash< Key >::operator() | ( | const Key & | a, |
const Key & | b | ||
) | const [inline] |
Returns true if a sorts before b, false otherwise.
Reimplemented from stl_hash_compare< Key >.
Definition at line 169 of file stl_compares.I.