Skip to content

Commit 828c2da

Browse files
authored
Merge pull request MatterHackers#1332 from larsbrubaker/master
expand helper
2 parents 5e20fab + adb1176 commit 828c2da

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

VectorMath/AxisAlignedBoundingBox.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ public void Expand(double amount)
141141
MaxXYZ.Z += amount;
142142
}
143143

144+
public void Expand(double x, double y, double z)
145+
{
146+
MinXYZ.X -= x;
147+
MinXYZ.Y -= y;
148+
MinXYZ.Z -= z;
149+
150+
MaxXYZ.X += x;
151+
MaxXYZ.Y += y;
152+
MaxXYZ.Z += z;
153+
}
154+
144155
public void ExpandToInclude(Vector3 position)
145156
{
146157
MinXYZ.X = Math.Min(MinXYZ.X, position.X);

0 commit comments

Comments
 (0)