Skip to content

Commit bd98016

Browse files
committed
format code, add missing javadoc information
1 parent cb07fc3 commit bd98016

File tree

8 files changed

+25
-13
lines changed

8 files changed

+25
-13
lines changed

src/main/java/io/github/lucasstarsz/fastj/engine/CrashMessages.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public static String illegalAction(Class<?> className) {
4242
}
4343

4444
/**
45-
* Gets a string starting with {@code "The game crashed, due to "}, and adds the specified error message to the end.
45+
* Gets a string starting with {@code "The game crashed, due to "}, and adds the specified error message to the
46+
* end.
4647
*
4748
* @param errorMessage The error message to add to the end of the returned string.
4849
* @return The generated error message.

src/main/java/io/github/lucasstarsz/fastj/graphics/DrawUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public static Path2D.Float createPath(Pointf[] pts) {
280280

281281
/**
282282
* Checks for equality in length and point values between two {@link Path2D} objects.
283-
*
283+
* <p>
284284
* Order does not matter for equality checking.
285285
*
286286
* @param path1 The first {@code Path2D} specified.

src/main/java/io/github/lucasstarsz/fastj/math/Maths.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ public static boolean floatEquals(float a, float b) {
120120
/**
121121
* Linearly interpolates between x and y, by the interpolation point t.
122122
*
123-
* @param x The first {@code float} value.
124-
* @param y THe second {@code float} value.
123+
* @param x The starting value.
124+
* @param y The end value.
125+
* @param t The interpolation value to work with (preferably within a range of 0.0 to 1.0).
125126
* @return The lerped value
126127
*/
127128
public static float lerp(float x, float y, float t) {

src/main/java/io/github/lucasstarsz/fastj/math/Point.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ public static int cross(Point p, Point p1) {
188188
* the {@code Point} version of the calculation. If you want the rotation calculated with floating-point math, use
189189
* {@link Point#rotate(Point, float)} instead.
190190
*
191+
* @param p The point to rotate.
191192
* @param angle The angle to rotate by, in degrees.
192193
* @return A rotated version of the original {@code Point}.
193194
*/
@@ -207,7 +208,9 @@ public static Point integerRotate(Point p, int angle) {
207208
* This rotation method rotates about the specified {@code center}. If you need to rotate about the origin, use
208209
* {@link #rotate(Point, float)}.
209210
*
210-
* @param angle The angle to rotate by, in degrees.
211+
* @param p The point to rotate.
212+
* @param angle The angle to rotate by, in degrees.
213+
* @param center The point to rotate about.
211214
* @return A rotated version of the original {@code Pointf}.
212215
*/
213216
public static Point integerRotate(Point p, float angle, Point center) {
@@ -231,6 +234,7 @@ public static Point integerRotate(Point p, float angle, Point center) {
231234
* returns the {@code Pointf} version of the calculation. If you want the rotation calculated with integer math, use
232235
* {@link Point#integerRotate(Point, int)} instead.
233236
*
237+
* @param p The point to rotate.
234238
* @param angle The angle to rotate by, in degrees.
235239
* @return A rotated version of the original {@code Point}, as a {@code Pointf}.
236240
*/
@@ -250,7 +254,9 @@ public static Pointf rotate(Point p, float angle) {
250254
* This rotation method rotates about the specified {@code center}. If you need to rotate about the origin, use
251255
* {@link #rotate(Point, float)}.
252256
*
253-
* @param angle The angle to rotate by, in degrees.
257+
* @param p The point to rotate.
258+
* @param angle The angle to rotate by, in degrees.
259+
* @param center The point to rotate around.
254260
* @return A rotated version of the original {@code Pointf}.
255261
*/
256262
public static Pointf rotate(Point p, float angle, Pointf center) {
@@ -494,7 +500,8 @@ public Point rotate(int angle) {
494500
* This rotation method rotates about the specified {@code center}. If you need to rotate about the origin, use
495501
* {@link #rotate(int)}.
496502
*
497-
* @param angle The angle to rotate by, in degrees.
503+
* @param angle The angle to rotate by, in degrees.
504+
* @param center The point to rotate about.
498505
* @return The {@code Pointf} with the rotated values.
499506
*/
500507
public Point rotate(float angle, Point center) {

src/main/java/io/github/lucasstarsz/fastj/math/Pointf.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public static float cross(Pointf p, Pointf p1) {
199199
* This rotation method rotates about the origin, {@code (0, 0)}. If you need to rotate about a point that is not
200200
* the origin, use {@link #rotate(float, Pointf)}.
201201
*
202+
* @param p The point to rotate.
202203
* @param angle The angle to rotate by, in degrees.
203204
* @return A rotated version of the original {@code Pointf}.
204205
*/
@@ -218,7 +219,9 @@ public static Pointf rotate(Pointf p, float angle) {
218219
* This rotation method rotates about the specified {@code center}. If you need to rotate about the origin, use
219220
* {@link #rotate(Pointf, float)}.
220221
*
221-
* @param angle The angle to rotate by, in degrees.
222+
* @param p The point to rotate.
223+
* @param angle The angle to rotate by, in degrees.
224+
* @param center The point to rotate around.
222225
* @return A rotated version of the original {@code Pointf}.
223226
*/
224227
public static Pointf rotate(Pointf p, float angle, Pointf center) {
@@ -452,7 +455,8 @@ public Pointf rotate(float angle) {
452455
* This rotation method rotates about the specified {@code center}. If you need to rotate about the origin, use
453456
* {@link #rotate(float)}.
454457
*
455-
* @param angle The angle to rotate by, in degrees.
458+
* @param angle The angle to rotate by, in degrees.
459+
* @param center The point to rotate around.
456460
* @return The {@code Pointf} with the rotated values.
457461
*/
458462
public Pointf rotate(float angle, Pointf center) {

src/main/java/io/github/lucasstarsz/fastj/systems/input/keyboard/Keyboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public void keyTyped(KeyEvent e) {
248248
* Processes the specified key event for the specified scene, based on its event type.
249249
*
250250
* @param scene The scene to fire the event to.
251-
* @param event The key event to process.
251+
* @param event The key event to process.
252252
*/
253253
public static void processEvent(Scene scene, KeyEvent event) {
254254
KeyEventProcessor.get(event.getID()).accept(scene, event);

src/main/java/io/github/lucasstarsz/fastj/systems/input/keyboard/Keys.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import java.awt.event.KeyEvent;
44

55
/**
6-
* Based on the {@link KeyEvent} class, the {@code Key} class defines better-looking
7-
* names for keyboard input keycodes.
6+
* Based on the {@link KeyEvent} class, the {@code Key} class defines better-looking names for keyboard input keycodes.
87
*
98
* @author Andrew Dey
109
* @version 1.0.0

src/main/java/io/github/lucasstarsz/fastj/systems/input/mouse/Mouse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public void mouseExited(MouseEvent e) {
303303
* Processes the specified mouse event for the specified scene, based on its event type.
304304
*
305305
* @param scene The scene to fire the event to.
306-
* @param event The mouse event to process.
306+
* @param event The mouse event to process.
307307
*/
308308
public static void processEvent(Scene scene, MouseEvent event) {
309309
MouseEventProcessor.get(event.getID()).accept(scene, event);

0 commit comments

Comments
 (0)