Skip to content

Commit b777c08

Browse files
author
github-actions
committed
style: apply google format
1 parent 9376a3b commit b777c08

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/org/openpatch/scratch/extensions/math/Random.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,28 @@ public static Vector2 randomVector2() {
6767
}
6868

6969
/**
70-
* Return a random x coordinate with respect to the width of the window.
71-
*
70+
* Return a random x coordinate with respect to the width of the window.
71+
*
7272
* @return a random x coordinate
7373
*/
7474
public static double randomX() {
75-
return Random.random(-Applet.getInstance().getWidth() / 2.0, Applet.getInstance().getWidth() / 2.0);
75+
return Random.random(
76+
-Applet.getInstance().getWidth() / 2.0, Applet.getInstance().getWidth() / 2.0);
7677
}
7778

7879
/**
79-
* Return a random y coordinate with respect to the width of the window.
80-
*
80+
* Return a random y coordinate with respect to the width of the window.
81+
*
8182
* @return a random y coordinate
8283
*/
8384
public static double randomY() {
84-
return Random.random(-Applet.getInstance().getHeight() / 2.0, Applet.getInstance().getHeight() / 2.0);
85+
return Random.random(
86+
-Applet.getInstance().getHeight() / 2.0, Applet.getInstance().getHeight() / 2.0);
8587
}
8688

8789
/**
88-
* Returns a random position with respect to the width of the window.
89-
*
90+
* Returns a random position with respect to the width of the window.
91+
*
9092
* @return a random position vector
9193
*/
9294
public static Vector2 randomPosition() {

src/org/openpatch/scratch/internal/Image.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class Image {
2828
/**
2929
* Construct a ScratchImage object by a name and a path to an image.
3030
*
31-
* @param name a a name
31+
* @param name a a name
3232
* @param imagePath a path to an image
3333
*/
3434
public Image(String name, String imagePath) {
@@ -210,10 +210,10 @@ public void setSize(int width, int height) {
210210
/**
211211
* Draw the scaled image at a given position.
212212
*
213-
* @param size a percentage value
213+
* @param size a percentage value
214214
* @param degrees direction
215-
* @param x a x coordinate
216-
* @param y a y coordinate
215+
* @param x a x coordinate
216+
* @param y a y coordinate
217217
*/
218218
public void draw(double size, double degrees, double x, double y, RotationStyle style) {
219219
Applet applet = Applet.getInstance();
@@ -273,10 +273,7 @@ public void draw() {
273273
parent.noTint();
274274
}
275275

276-
/**
277-
* Draw the image as a background. The image is automatically scaled to fit the
278-
* window size.
279-
*/
276+
/** Draw the image as a background. The image is automatically scaled to fit the window size. */
280277
public void drawAsBackground() {
281278
PApplet applet = Applet.getInstance();
282279
applet.tint(

0 commit comments

Comments
 (0)