Skip to content

Commit 5403fd1

Browse files
committed
fix all javadoc errors
1 parent 5c20893 commit 5403fd1

File tree

9 files changed

+40
-59
lines changed

9 files changed

+40
-59
lines changed

pom.xml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>micycle</groupId>
66
<artifactId>PeasyGradients</artifactId>
7-
<version>1.0.0-SNAPSHOT</version>
7+
<version>0.9.4</version>
88
<name>PeasyGradients</name>
99

1010
<properties>
1111
<sonar.projectKey>micycle1_PeasyGradients</sonar.projectKey>
1212
<sonar.organization>micycle</sonar.organization>
1313
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
14-
<junit>[5.9,)</junit>
14+
<junit>[5.11,)</junit>
1515
</properties>
1616

1717
<build>
@@ -20,7 +20,7 @@
2020
<plugins>
2121
<plugin>
2222
<artifactId>maven-compiler-plugin</artifactId>
23-
<version>3.8.1</version>
23+
<version>3.13.0</version>
2424
<configuration>
2525
<source>1.8</source>
2626
<target>1.8</target>
@@ -30,7 +30,7 @@
3030
<plugin>
3131
<groupId>org.apache.maven.plugins</groupId>
3232
<artifactId>maven-source-plugin</artifactId>
33-
<version>3.2.1</version>
33+
<version>3.3.1</version>
3434
<executions>
3535
<execution>
3636
<id>attach-sources</id>
@@ -44,22 +44,23 @@
4444
<plugin>
4545
<groupId>org.apache.maven.plugins</groupId>
4646
<artifactId>maven-javadoc-plugin</artifactId>
47-
<version>3.4.1</version>
47+
<version>3.11.1</version>
4848
<executions>
4949
<execution>
5050
<id>attach-javadocs</id>
5151
<goals>
5252
<goal>jar</goal>
5353
</goals>
5454
<configuration>
55-
<additionalJOption>-Xdoclint:none</additionalJOption>
55+
<excludePackageNames>
56+
micycle.peasygradients.utilities,micycle.peasygradients.utilities.*</excludePackageNames>
5657
</configuration>
5758
</execution>
5859
</executions>
5960
</plugin>
6061
<plugin> <!-- for test running -->
6162
<artifactId>maven-surefire-plugin</artifactId>
62-
<version>2.22.2</version>
63+
<version>3.5.2</version>
6364
</plugin>
6465
</plugins>
6566
</build>
@@ -72,7 +73,7 @@
7273
<plugin>
7374
<groupId>org.apache.maven.plugins</groupId>
7475
<artifactId>maven-shade-plugin</artifactId>
75-
<version>3.2.4</version>
76+
<version>3.6.0</version>
7677
<configuration>
7778
<createDependencyReducedPom>false</createDependencyReducedPom>
7879
<filters>
@@ -119,7 +120,8 @@
119120
<artifactId>processing3</artifactId>
120121
<version>3.5.4</version>
121122
<scope>provided</scope> <!-- don't package into uber jar -->
122-
<optional>true</optional> <!-- user artifact should override when provided -->
123+
<optional>true</optional> <!-- user artifact should override when
124+
provided -->
123125
</dependency>
124126
<dependency>
125127
<groupId>com.github.micycle1</groupId>

src/main/micycle/peasygradients/PeasyGradients.java

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,14 @@
4747
* with multiple color stops and custom center offsets)
4848
* </ul>
4949
*
50-
* <p>
51-
* By default, renders directly to the Processing sketch. Use
50+
* <p>By default, renders directly to the Processing sketch. Use
5251
* {@code .setRenderTarget()} to specify a custom {@code PGraphics} output
53-
* buffer.
52+
* buffer.</p>
5453
*
5554
* <p>
56-
* Linear, radial & conic sampling algorithms adapted from <a href=
57-
* "https://medium.com/@behreajj/color-gradients-in-processing-v-2-0-e5c0b87cdfd2">
58-
* Jeremy Behreandt's work</a>. Additional sampling patterns are original
59-
* implementations.
60-
*
55+
* Linear, radial &amp; conic sampling algorithms adapted from Jeremy
56+
* Behreandt. Additional sampling patterns are original implementations.
57+
* </p>
6158
*
6259
* @author Michael Carleton
6360
*/
@@ -178,7 +175,7 @@ public void setRenderTarget(PApplet p, int offSetX, int offSetY, int width, int
178175
* PGraphics object provided by the user.
179176
*
180177
* @param g PImage or PGraphics object to render gradients into
181-
* @see #renderIntoSketch()
178+
* @see #setRenderTarget(PApplet)
182179
*/
183180
public void setRenderTarget(PImage g) {
184181
setRenderTarget(g, 0, 0, g.width, g.height);
@@ -356,7 +353,6 @@ public void linearGradient(Gradient gradient, PVector centerPoint, double angle)
356353
/**
357354
* Renders a linear gradient using a given gradient centerpoint, angle and
358355
* length.
359-
*
360356
* <p>
361357
* It's called 'linear' because the colors flow from left-to-right,
362358
* top-to-bottom, or at any angle you chose in a single direction.
@@ -367,8 +363,9 @@ public void linearGradient(Gradient gradient, PVector centerPoint, double angle)
367363
* @param angle in radians
368364
* @param length coefficient to lerp from centrepoint to edges (that
369365
* intersect with angle). default = 1: (first and last colors
370-
* will be exactly on edge); <1: colors will be sqashed; >1
371-
* colors spread out (outermost colors will leave the view).
366+
* will be exactly on edge); When &lt;1, colors will be
367+
* squashed; when &gt;1, colors spread out (outermost colors
368+
* will leave the view).
372369
*/
373370
public void linearGradient(Gradient gradient, PVector centerPoint, double angle, double length) {
374371
// get edge-line intersection points
@@ -456,19 +453,11 @@ public void radialGradient(Gradient gradient, PVector centerPoint, double zoom)
456453
* angle provided and the contrast between the color values is great enough to
457454
* tell a difference.
458455
*
459-
* <p>
460-
* This method creates a hard stop where the first and last colors bump right up
461-
* to one another. See
462-
* {@link #conicGradientSmooth(Gradient, PVector, double, double)
463-
* conicGradientSmooth()} to render a conic gradient with a smooth transition
464-
* between the first and last colors.
465-
*
466456
* @param gradient 1D {@link Gradient gradient} to use as the basis for the
467457
* conic gradient
468458
* @param centerPoint The PVector center point of the gradient — the position
469459
* where it radiates from.
470460
* @param angle in radians, where 0 is east; going clockwise
471-
* @see #conicGradientSmooth(Gradient, PVector, double, double)
472461
*/
473462
public void conicGradient(Gradient gradient, PVector centerPoint, double angle) {
474463
// TODO add zoom arg
@@ -1457,8 +1446,8 @@ public Boolean call() {
14571446

14581447
double z = (renderMidpointY - newYpos) / (renderMidpointX - newXpos); // atan2(y,x) === atan(y/x), so calc y/x here
14591448

1460-
double dist = Math.sqrt((yDist + xDist + pinch) * (z * z + roundness)) * denominator; // cos(atan(x)) === sqrt(z * z +
1461-
// 1)
1449+
// cos(atan(x)) === sqrt(z * z + 1)
1450+
double dist = Math.sqrt((yDist + xDist + pinch) * (z * z + roundness)) * denominator;
14621451

14631452
final int stepInt = clampAndDither(dist, x, y);
14641453
gradientPG.pixels[pixel++] = gradientCache[stepInt];

src/main/micycle/peasygradients/colorspace/ColorSpace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public enum ColorSpace {
8383
JAB(new JAB()),
8484
/**
8585
* Natural color mixing by treating colors as real-life pigments using the
86-
* Kubelka & Munk theory to predict realistic color behavior.
86+
* Kubelka &amp; Munk theory to predict realistic color behavior.
8787
*/
8888
KMUNK(new K_MUNK()),
8989
/**

src/main/micycle/peasygradients/colorspace/ColorSpaceTransform.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public interface ColorSpaceTransform {
4848
* @param step a double value between 0.0 and 1.0 representing the interpolation
4949
* factor, where 0.0 corresponds to the starting color, 1.0 to the
5050
* ending color, and values in between to intermediate colors
51-
* @param out an array of doubles where the interpolated color will be stored.
52-
* This array must be pre-allocated and of appropriate length for
53-
* the color space
5451
* @return the {@code out} array containing the interpolated color
5552
*/
5653
public default double[] interpolateLinear(double[] a, double[] b, double step) {

src/main/micycle/peasygradients/gradient/Gradient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <p>
3232
* This class defines only the mathematical gradient function - it does not
3333
* handle the actual rendering or rasterization. To generate a two-dimensional
34-
* visualization of this gradient, use a {@link #peasyGradients.PeasyGradients}
34+
* visualization of this gradient, use a {@link micycle.peasygradients.PeasyGradients PeasyGradients}
3535
* instance, which will sample this function to create a 2D spectrum.
3636
*
3737
* @author Michael Carleton
@@ -239,7 +239,7 @@ public void setStopColor(int stopIndex, int col) {
239239

240240
/**
241241
* Sets the 1D position of a color stop (given by its index) to a certain
242-
* position on the 1D gradient axis. Positions < 0 or > 1 will wrap around the
242+
* position on the 1D gradient axis. Positions &lt; 0 or &gt; 1 will wrap around the
243243
* gradient.
244244
*
245245
* @param index

src/main/micycle/peasygradients/utilities/ColorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static float[] interpolateLinear(float[] col1, float[] col2, float step,
5959
* Composes a 32-bit ARGB color from RGB components represented as a float
6060
* array.
6161
*
62-
* @param RGBA The RGB components as a float array [R,G,B] with each value in
62+
* @param RGB The RGB components as a float array [R,G,B] with each value in
6363
* the range 0...1.
6464
* @return The composed ARGB color as an integer.
6565
*/

src/main/micycle/peasygradients/utilities/FastPow.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* "http://www.hxa7241.org/articles/content/fast-pow-adjustable_hxa7241_2007.html">Fast
1010
* pow() With Adjustable Accuracy</a> by Harrison Ainsworth.
1111
* <p>
12-
* When precision = 11 (8KB table), mean error is < 0.01%, and max error is <
12+
* When precision = 11 (8KB table), mean error is &lt; 0.01%, and max error is &lt;
1313
* 0.02% (proportional, ie: abs(true - approx) / true).
1414
* <p>
1515
* The essential approximation is a 'staircase' function across the fraction
@@ -49,7 +49,7 @@ private FastPow() {
4949
*
5050
* fastLog speed factor drops off after 14 bits.
5151
*
52-
* @param precision number of mantissa bits used, >= 0 and <= 18
52+
* @param precision number of mantissa bits used, &ge; 0 and &le; 18
5353
*/
5454
public static void init(int precision) {
5555

@@ -112,7 +112,7 @@ public static float fastPow(final float base, final float exponent) {
112112
/**
113113
* Includes further optimisation to calculate base representation.
114114
*
115-
* @param baseRepresentation the exact base
115+
* @param base the exact base
116116
* @param exponent power to raise radix to
117117
* @return
118118
* @see #fastPow(float, float)

src/main/micycle/peasygradients/utilities/Functions.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public static double fastAtan(double z) {
328328
* @param y
329329
* @param x
330330
* @return
331-
* @see #fastAtan(float)
331+
* @see #fastAtan(double)
332332
*/
333333
public static double fastAtan2a(double y, double x) {
334334
if (x != 0.0f) {
@@ -460,17 +460,15 @@ public static float lerpAngle(float fromRadians, float toRadians, float progress
460460
* given by a point inside the rectangle and an angle.
461461
* <p>
462462
* A Java/Processing implementation of
463-
* <a href="https://gamedev.stackexchange.com/questions/124108/i-need-to-find-
464-
* intersection-point-of-a-vector-in-an-axis-aligned-rectangle">this SE Game Dev
463+
* <a href="https://gamedev.stackexchange.com/questions/124108">this SE Game Dev
465464
* answer</a>.
466-
*
467-
*
468-
* @param rectCoords a float[4] containing the rectangle corner coordinates
469-
* {UL,BL,BR,UR}
470-
* @param point 2D coordinates of point within rectangle (i.e. where the
471-
* line originates from)
472-
* @param angle angle of line in radians (where 0 faces east). Increases in
473-
* a clockwise manner
465+
*
466+
* @param rect a float[4] containing the rectangle corner coordinates
467+
* {UL,BL,BR,UR}
468+
* @param point 2D coordinates of point within rectangle (i.e. where the line
469+
* originates from)
470+
* @param angle angle of line in radians (where 0 faces east). Increases in a
471+
* clockwise manner
474472
* @return PVector[2] containing the two points of intersection
475473
* @see #lineRectIntersection(float, float, PVector, float)
476474
*/
@@ -506,7 +504,7 @@ public static PVector[] lineRectIntersection(PVector[] rect, PVector point, floa
506504
}
507505

508506
/**
509-
* An x-axis & y-axis aligned version of
507+
* An x-axis &amp; y-axis aligned version of
510508
* {@link #lineRectIntersection(PVector[], PVector, float) this} method.
511509
*
512510
* <p>

src/main/micycle/peasygradients/utilities/Interpolation.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ public enum Interpolation {
3434
*/
3535
SMOOTH_STEP,
3636
/**
37-
* Ken Perlin's smoother step, a simoid like function.
38-
*
39-
* @param st step, between 0 and 1
40-
* @return the new mapped step, having undergone a transformation according to a
41-
* sigmoid-like function (eg: [0.5 -> 0.5], [0.25 -> 0.104], [0.65
42-
* ->0.765])
37+
* Ken Perlin's smoother step, a sigmoid like function.
4338
*/
4439
SMOOTHER_STEP,
4540
/*

0 commit comments

Comments
 (0)