Skip to content

Commit 04f8ed3

Browse files
committed
more tweaking of javadoc
1 parent 90af6ce commit 04f8ed3

File tree

4 files changed

+30
-36
lines changed

4 files changed

+30
-36
lines changed

src/main/java/com/github/stephengold/joltjni/RVec3.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ public static RVec3 sZero() {
298298
// RVec3Arg methods
299299

300300
/**
301-
* Return the cross product with the specified vector. The current vector is
302-
* unaffected.
301+
* Return the cross product with the argument. Both vectors are unaffected.
303302
*
304303
* @param rightFactor the vector to cross with the current one (not null,
305304
* unaffected)
@@ -374,8 +373,8 @@ public Object getZ() {
374373
}
375374

376375
/**
377-
* Test whether the squared length is within 1e-12 (single-precision) or
378-
* 1e-24 (double-precision) of zero. The vector is unaffected.
376+
* Test whether the squared length is within 10^-12 (single-precision) or
377+
* 10^-24 (double-precision) of zero. The vector is unaffected.
379378
*
380379
* @return {@code true} if nearly zero, otherwise {@code false}
381380
*/
@@ -390,7 +389,7 @@ public boolean isNearZero() {
390389
* Test whether the squared length is within the specified tolerance of
391390
* zero. The vector is unaffected.
392391
*
393-
* @param tolerance the desired tolerance (≥0)
392+
* @param tolerance the desired tolerance (≥0, default=1e-12 or 1e-24)
394393
* @return {@code true} if nearly zero, otherwise {@code false}
395394
*/
396395
@Override

src/main/java/com/github/stephengold/joltjni/Vec3.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@ public static Vec3 sZero() {
528528
// Vec3Arg methods
529529

530530
/**
531-
* Return the cross product with the specified vector. The current vector is
532-
* unaffected.
531+
* Return the cross product with the argument. Both vectors are unaffected.
533532
*
534533
* @param rightFactor the vector to cross with the current one (not null,
535534
* unaffected)
@@ -550,8 +549,7 @@ public Vec3 cross(Vec3Arg rightFactor) {
550549
}
551550

552551
/**
553-
* Return the dot product with the specified vector. Both vectors are
554-
* unaffected.
552+
* Return the dot product with the argument. Both vectors are unaffected.
555553
*
556554
* @param factor the vector to dot with the current one (not null,
557555
* unaffected)
@@ -679,7 +677,7 @@ public boolean isNan() {
679677
}
680678

681679
/**
682-
* Test whether the squared length is within 1e-12 of zero. The vector is
680+
* Test whether the squared length is within 10^-12 of zero. The vector is
683681
* unaffected.
684682
*
685683
* @return {@code true} if nearly zero, otherwise {@code false}
@@ -694,7 +692,7 @@ public boolean isNearZero() {
694692
* Test whether the squared length is within the specified tolerance of
695693
* zero. The vector is unaffected.
696694
*
697-
* @param tolerance the desired tolerance (≥0. default=1e-12)
695+
* @param tolerance the desired tolerance (≥0, default=1e-12)
698696
* @return {@code true} if nearly zero, otherwise {@code false}
699697
*/
700698
@Override
@@ -723,7 +721,7 @@ public boolean isNormalized() {
723721
* Test whether the vector is normalized to within the specified tolerance.
724722
* The vector is unaffected.
725723
*
726-
* @param tolerance the desired tolerance (default=1e-6)
724+
* @param tolerance the desired tolerance (≥0, default=1e-6)
727725
* @return {@code true} if normalized, otherwise {@code false}
728726
*/
729727
@Override
@@ -761,8 +759,8 @@ public float lengthSq() {
761759
}
762760

763761
/**
764-
* Generate a normalized vector with the same direction. The current vector
765-
* is unaffected.
762+
* Generate a unit vector with the same direction. The current vector is
763+
* unaffected.
766764
*
767765
* @return a new vector
768766
*/
@@ -774,8 +772,8 @@ public Vec3 normalized() {
774772

775773
/**
776774
* Return a copy of the argument if the length of the current vector is
777-
* zero. Otherwise, generate a normalized vector with the same direction as
778-
* the current vector. The current vector is unaffected.
775+
* zero. Otherwise, generate a unit vector with the same direction as the
776+
* current vector. The current vector is unaffected.
779777
*
780778
* @param zeroValue the value to return if the length is zero (not null,
781779
* unaffected)

src/main/java/com/github/stephengold/joltjni/readonly/RVec3Arg.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2024 Stephen Gold
2+
Copyright (c) 2024-2025 Stephen Gold
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
@@ -34,8 +34,7 @@ public interface RVec3Arg {
3434
// new methods exposed
3535

3636
/**
37-
* Return the cross product with the specified vector. The current vector is
38-
* unaffected.
37+
* Return the cross product with the argument. Both vectors are unaffected.
3938
*
4039
* @param rightFactor the vector to cross with the current one (not null,
4140
* unaffected)
@@ -44,32 +43,32 @@ public interface RVec3Arg {
4443
RVec3 cross(RVec3Arg rightFactor);
4544

4645
/**
47-
* Return the first (X) component at positional precision. The vector is
46+
* Return the first (X) component in positional precision. The vector is
4847
* unaffected.
4948
*
5049
* @return the component value
5150
*/
5251
Object getX();
5352

5453
/**
55-
* Return the 2nd (Y) component at positional precision. The vector is
54+
* Return the 2nd (Y) component in positional precision. The vector is
5655
* unaffected.
5756
*
5857
* @return the component value
5958
*/
6059
Object getY();
6160

6261
/**
63-
* Return the 3rd (Z) component at positional precision. The vector is
62+
* Return the 3rd (Z) component in positional precision. The vector is
6463
* unaffected.
6564
*
6665
* @return the component value
6766
*/
6867
Object getZ();
6968

7069
/**
71-
* Test whether the squared length is within 1e-12 (single-precision) or
72-
* 1e-24 (double-precision) of zero. The vector is unaffected.
70+
* Test whether the squared length is within 10^-12 (single-precision) or
71+
* 10^-24 (double-precision) of zero. The vector is unaffected.
7372
*
7473
* @return {@code true} if nearly zero, otherwise {@code false}
7574
*/
@@ -79,7 +78,7 @@ public interface RVec3Arg {
7978
* Test whether the squared length is within the specified tolerance of
8079
* zero. The vector is unaffected.
8180
*
82-
* @param tolerance the desired tolerance (≥0)
81+
* @param tolerance the desired tolerance (≥0, default=1e-12 or 1e-24)
8382
* @return {@code true} if nearly zero, otherwise {@code false}
8483
*/
8584
boolean isNearZero(double tolerance);

src/main/java/com/github/stephengold/joltjni/readonly/Vec3Arg.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public interface Vec3Arg {
3636
// new methods exposed
3737

3838
/**
39-
* Return the cross product with the specified vector. The current vector is
40-
* unaffected.
39+
* Return the cross product with the argument. Both vectors are unaffected.
4140
*
4241
* @param rightFactor the vector to cross with the current one (not null,
4342
* unaffected)
@@ -46,8 +45,7 @@ public interface Vec3Arg {
4645
Vec3 cross(Vec3Arg rightFactor);
4746

4847
/**
49-
* Return the dot product with the specified vector. Both vectors are
50-
* unaffected.
48+
* Return the dot product with the argument. Both vectors are unaffected.
5149
*
5250
* @param factor the vector to dot with the current one (not null,
5351
* unaffected)
@@ -122,7 +120,7 @@ public interface Vec3Arg {
122120
boolean isNan();
123121

124122
/**
125-
* Test whether the squared length is within 1e-12 of zero. The vector is
123+
* Test whether the squared length is within 10^-12 of zero. The vector is
126124
* unaffected.
127125
*
128126
* @return {@code true} if nearly zero, otherwise {@code false}
@@ -133,7 +131,7 @@ public interface Vec3Arg {
133131
* Test whether the squared length is within the specified tolerance of
134132
* zero. The vector is unaffected.
135133
*
136-
* @param tolerance the desired tolerance (≥0. default=1e-12)
134+
* @param tolerance the desired tolerance (≥0, default=1e-12)
137135
* @return {@code true} if nearly zero, otherwise {@code false}
138136
*/
139137
boolean isNearZero(float tolerance);
@@ -150,7 +148,7 @@ public interface Vec3Arg {
150148
* Test whether the vector is normalized to within the specified tolerance.
151149
* The vector is unaffected.
152150
*
153-
* @param tolerance the desired tolerance (default=1e-6)
151+
* @param tolerance the desired tolerance (≥0, default=1e-6)
154152
* @return {@code true} if normalized, otherwise {@code false}
155153
*/
156154
boolean isNormalized(float tolerance);
@@ -170,17 +168,17 @@ public interface Vec3Arg {
170168
float lengthSq();
171169

172170
/**
173-
* Generate a normalized vector with the same direction. The current vector
174-
* is unaffected.
171+
* Generate a unit vector with the same direction. The current vector is
172+
* unaffected.
175173
*
176174
* @return a new vector
177175
*/
178176
Vec3 normalized();
179177

180178
/**
181179
* Return a copy of the argument if the length of the current vector is
182-
* zero. Otherwise, generate a normalized vector with the same direction as
183-
* the current vector. The current vector is unaffected.
180+
* zero. Otherwise, generate a unit vector with the same direction as the
181+
* current vector. The current vector is unaffected.
184182
*
185183
* @param zeroValue the value to return if the length is zero (not null,
186184
* unaffected)

0 commit comments

Comments
 (0)