mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Return 0 volume for empty AlignedBox
This commit is contained in:
committed by
Charles Schlosser
parent
64edfbed04
commit
251ec42087
@@ -173,7 +173,7 @@ class AlignedBox {
|
||||
}
|
||||
|
||||
/** \returns the volume of the bounding box */
|
||||
EIGEN_DEVICE_FUNC inline Scalar volume() const { return sizes().prod(); }
|
||||
EIGEN_DEVICE_FUNC inline Scalar volume() const { return isEmpty() ? Scalar(0) : sizes().prod(); }
|
||||
|
||||
/** \returns an expression for the bounding box diagonal vector
|
||||
* if the length of the diagonal is needed: diagonal().norm()
|
||||
|
||||
Reference in New Issue
Block a user