mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added "max" and "min" constants to the primitive types which represent the
largest and smallest representable values. Accessible directly and via pTraits.
This commit is contained in:
@ -319,10 +319,7 @@ Type max(const UList<Type>& f)
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("max(const UList<Type>&)")
|
||||
<< "empty field, returning zero" << endl;
|
||||
|
||||
return pTraits<Type>::zero;
|
||||
return pTraits<Type>::min;
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,10 +336,7 @@ Type min(const UList<Type>& f)
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("min(const UList<Type>&)")
|
||||
<< "empty field, returning zero" << endl;
|
||||
|
||||
return pTraits<Type>::zero;
|
||||
return pTraits<Type>::max;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user