MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateRangeFinite

Function UpdateRangeFinite

Common/Core/vtkMathUtilities.h:130–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 */
129template <class A>
130inline void UpdateRangeFinite(A& min, A& max, const A& value)
131{
132 if constexpr (std::is_floating_point_v<A>)
133 {
134 if (VTK_UNLIKELY(std::isinf(value) || std::isnan(value)))
135 {
136 return;
137 }
138 }
139 if (value < min)
140 {
141 min = value;
142 max = std::max(max, value);
143 }
144 else if (value > max)
145 {
146 min = std::min(min, value);
147 max = value;
148 }
149}
150
151VTK_ABI_NAMESPACE_END
152} // End vtkMathUtilities namespace.

Callers

nothing calls this directly

Calls 4

isinfFunction · 0.85
isnanFunction · 0.70
maxFunction · 0.50
minFunction · 0.50

Tested by

no test coverage detected