Skip to content

Commit

Permalink
code and grammar cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Jan 16, 2025
1 parent 5685bdc commit 4f4adc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utility/src/main/java/com/dua3/utility/ui/Graphics.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ default void strokeLine(Vector2f a, Vector2f b) {
* <p>The method first retrieves the inverse of the current transformation using {@link #getTransformation()} and
* throws an exception if the transformation is not present. Then, it calculates the bounds of the graphics using
* the {@link #getBounds()} method. Finally, it transforms the minimum and maximum coordinates of the bounds using
* the inverse transformation to obtain the bounds in the local coordinate space.</p>
* the inverse transformation to get the bounds in the local coordinate space.</p>
*
* @return the bounding rectangle in the local coordinate space
* @throws NoSuchElementException if the inverse of the current transformation is not present
Expand Down Expand Up @@ -416,7 +416,7 @@ enum TextRotationMode {
ROTATE_AND_TRANSLATE_BLOCK,
/**
* Rotate each line independently. As a result, All lines of a left aligned text will start at the given
* x-coordinate (for rotation angles between -π/4 and π/4 (-45° amd 45°).
* x-coordinate (for rotation angles between -π/4 and π/4, or -45° and 45°).
*
* <p>For rotation with an absolute amount larger than π/4, the y-coordinate is used for alignment instead.
*/
Expand Down Expand Up @@ -645,7 +645,7 @@ private void renderFragments(Rectangle2f cr, Alignment hAlign, VerticalAlignment
sx_h = 0.0f;
} else {
setTransformation(AffineTransformation2f.combine(t, AffineTransformation2f.rotate(angle, Vector2f.of(cr.x(), cr.y()))));
switch ((int) (angle/MathUtil.PI_QUARTER)) {
switch ((int) (angle / MathUtil.PI_QUARTER)) {
case 0, 4 -> {
sx_y = (float) (Math.tan(angle));
sx_h = sx_y;
Expand Down Expand Up @@ -843,7 +843,7 @@ static void approximateArc(
double endAngle = Math.atan2(p1l.y() - cl.y(), p1l.x() - cl.x());
double sweepAngle;
float sweepSign = sweep ? 1 : -1;
if (sweepSign * endAngle < sweepSign *startAngle) {
if (sweepSign * endAngle < sweepSign * startAngle) {
endAngle += sweepSign * 2 * Math.PI;
}
sweepAngle = endAngle - startAngle;
Expand Down

0 comments on commit 4f4adc0

Please sign in to comment.