Skip to content

Commit 0fdc693

Browse files
committed
Update documentation
1 parent 4d1f0e4 commit 0fdc693

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

src/AxisAlignedBB.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ public function contractedCopy(float $x, float $y, float $z) : AxisAlignedBB{
180180
* @param float $distance Negative values pull the face in, positive values push out.
181181
*
182182
* @return $this
183-
* @throws \InvalidArgumentException
184183
*/
185184
public function extend(Facing $face, float $distance) : AxisAlignedBB{
186185
match($face){
@@ -198,8 +197,6 @@ public function extend(Facing $face, float $distance) : AxisAlignedBB{
198197
/**
199198
* Returns an extended clone of this bounding box.
200199
* @see AxisAlignedBB::extend()
201-
*
202-
* @throws \InvalidArgumentException
203200
*/
204201
public function extendedCopy(Facing $face, float $distance) : AxisAlignedBB{
205202
return (clone $this)->extend($face, $distance);
@@ -212,7 +209,6 @@ public function extendedCopy(Facing $face, float $distance) : AxisAlignedBB{
212209
* @param float $distance Positive values pull the face in, negative values push out.
213210
*
214211
* @return $this
215-
* @throws \InvalidArgumentException
216212
*/
217213
public function trim(Facing $face, float $distance) : AxisAlignedBB{
218214
return $this->extend($face, -$distance);
@@ -221,8 +217,6 @@ public function trim(Facing $face, float $distance) : AxisAlignedBB{
221217
/**
222218
* Returns a trimmed clone of this bounding box.
223219
* @see AxisAlignedBB::trim()
224-
*
225-
* @throws \InvalidArgumentException
226220
*/
227221
public function trimmedCopy(Facing $face, float $distance) : AxisAlignedBB{
228222
return $this->extendedCopy($face, -$distance);

src/Facing.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public function opposite() : Facing{
8686

8787
/**
8888
* Rotates the given direction around the axis.
89+
*
90+
* @throws \InvalidArgumentException
8991
*/
9092
public function rotate(Axis $axis, bool $clockwise) : Facing{
9193
$rotated = match ($axis) {
@@ -115,14 +117,32 @@ public function rotate(Axis $axis, bool $clockwise) : Facing{
115117
return $clockwise ? $rotated : $rotated->opposite();
116118
}
117119

120+
/**
121+
* Rotates the given direction around the Y axis.
122+
*
123+
* @see Facing::rotate()
124+
* @throws \InvalidArgumentException
125+
*/
118126
public function rotateY(bool $clockwise) : Facing{
119127
return $this->rotate(Axis::Y, $clockwise);
120128
}
121129

130+
/**
131+
* Rotates the given direction around the Z axis.
132+
*
133+
* @see Facing::rotate()
134+
* @throws \InvalidArgumentException
135+
*/
122136
public function rotateZ(bool $clockwise) : Facing{
123137
return $this->rotate(Axis::Z, $clockwise);
124138
}
125139

140+
/**
141+
* Rotates the given direction around the X axis.
142+
*
143+
* @see Facing::rotate()
144+
* @throws \InvalidArgumentException
145+
*/
126146
public function rotateX(bool $clockwise) : Facing{
127147
return $this->rotate(Axis::X, $clockwise);
128148
}

0 commit comments

Comments
 (0)