Skip to content

Commit

Permalink
Adds a function to get the largest dimension of an Envelope3D
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed May 24, 2021
1 parent b010c3a commit 5b0f1e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions msi.gama.core/src/msi/gama/common/geometry/Envelope3D.java
Expand Up @@ -195,6 +195,15 @@ private Envelope3D set(final Envelope3D env) {
return this;
}

/**
* Returns the maximal dimension of the envelope
*/

public double getLargestDimension() {
double result = Math.max(getWidth(), getHeight());
return Math.max(result, getDepth());
}

/**
* Makes this <code>Envelope</code> a "null" envelope, that is, the envelope of the empty geometry.
*/
Expand Down

0 comments on commit 5b0f1e1

Please sign in to comment.