Skip to content

Commit 1a3ef4e

Browse files
committed
Change documentation
1 parent c95581e commit 1a3ef4e

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

src/AxisAlignedBB.php

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ public function addCoord(float $x, float $y, float $z) : AxisAlignedBB{
8888
}
8989

9090
/**
91-
* Outsets the bounds of this AxisAlignedBB by the specified X, Y and Z.
92-
*
93-
* Returns an expanded clone of this AxisAlignedBB.
91+
* Returns a copy of the AxisAlignedBB with bounds outset by the specified X, Y and Z.
9492
*/
9593
public function expandedCopy(float $x, float $y, float $z): AxisAlignedBB{
9694
return new AxisAlignedBB(
@@ -104,9 +102,7 @@ public function expandedCopy(float $x, float $y, float $z): AxisAlignedBB{
104102
}
105103

106104
/**
107-
* Shifts this AxisAlignedBB by the given X, Y and Z.
108-
*
109-
* Returns an offset clone of this AxisAlignedBB.
105+
* Returns a copy of the AxisAlignedBB with bounds offset by the specified X, Y and Z.
110106
*/
111107
public function offsetCopy(float $x, float $y, float $z) : AxisAlignedBB{
112108
return new AxisAlignedBB(
@@ -120,9 +116,7 @@ public function offsetCopy(float $x, float $y, float $z) : AxisAlignedBB{
120116
}
121117

122118
/**
123-
* Offsets this AxisAlignedBB in the given direction by the specified distance.
124-
*
125-
* Returns an offset clone of this AxisAlignedBB.
119+
* Returns a copy of the AxisAlignedBB with bounds offset in the given direction by the specified distance.
126120
*/
127121
public function offsetTowardsCopy(Facing $face, float $distance) : AxisAlignedBB{
128122
[$offsetX, $offsetY, $offsetZ] = $face->offset();
@@ -131,9 +125,7 @@ public function offsetTowardsCopy(Facing $face, float $distance) : AxisAlignedBB
131125
}
132126

133127
/**
134-
* Insets the bounds of this AxisAlignedBB by the specified X, Y and Z.
135-
*
136-
* Returns an contracted clone of this AxisAlignedBB.
128+
* Returns a copy of the AxisAlignedBB with bounds contracted by the specified X, Y and Z.
137129
*/
138130
public function contractedCopy(float $x, float $y, float $z) : AxisAlignedBB{
139131
return new AxisAlignedBB(
@@ -147,11 +139,9 @@ public function contractedCopy(float $x, float $y, float $z) : AxisAlignedBB{
147139
}
148140

149141
/**
150-
* Extends the AABB in the given direction.
151-
*
152142
* @param float $distance Negative values pull the face in, positive values push out.
153143
*
154-
* Returns an extended clone of this AxisAlignedBB.
144+
* Returns a copy of the AxisAlignedBB with bounds extended in the given direction.
155145
*/
156146
public function extendedCopy(Facing $face, float $distance) : AxisAlignedBB{
157147
$minX = $this->minX;
@@ -174,23 +164,21 @@ public function extendedCopy(Facing $face, float $distance) : AxisAlignedBB{
174164
}
175165

176166
/**
177-
* Inverse of extend().
178-
* @see AxisAlignedBB::extendedCopy()
179-
*
180167
* @param float $distance Positive values pull the face in, negative values push out.
181168
*
182-
* Returns an trimmed clone of this AxisAlignedBB.
169+
* Returns a copy of the AxisAlignedBB with bounds trimmed in the given direction.
170+
*
171+
* Inverse of extend().
172+
* @see AxisAlignedBB::extendedCopy()
183173
*/
184174
public function trimmedCopy(Facing $face, float $distance) : AxisAlignedBB{
185175
return $this->extendedCopy($face, -$distance);
186176
}
187177

188178
/**
189-
* Increases the dimension of the AABB along the given axis.
190-
*
191179
* @param float $distance Negative values reduce width, positive values increase width.
192180
*
193-
* Returns an stretched clone of this AxisAlignedBB.
181+
* Returns a copy of the AxisAlignedBB with bounds stretched along the given axis.
194182
*/
195183
public function stretchedCopy(Axis $axis, float $distance) : AxisAlignedBB{
196184
$minX = $this->minX;
@@ -215,10 +203,10 @@ public function stretchedCopy(Axis $axis, float $distance) : AxisAlignedBB{
215203
}
216204

217205
/**
218-
* Reduces the dimension of the AABB on the given axis. Inverse of stretch().
206+
* Returns a copy of the AxisAlignedBB with bounds squashed along the given axis.
207+
*
208+
* Inverse of stretch().
219209
* @see AxisAlignedBB::stretchedCopy()
220-
*
221-
* Returns an squashed clone of this AxisAlignedBB.
222210
*/
223211
public function squashedCopy(Axis $axis, float $distance) : AxisAlignedBB{
224212
return $this->stretchedCopy($axis, -$distance);

0 commit comments

Comments
 (0)