Skip to content

Commit

Permalink
more tweaking of javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Feb 24, 2025
1 parent 90af6ce commit 04f8ed3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
9 changes: 4 additions & 5 deletions src/main/java/com/github/stephengold/joltjni/RVec3.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ public static RVec3 sZero() {
// RVec3Arg methods

/**
* Return the cross product with the specified vector. The current vector is
* unaffected.
* Return the cross product with the argument. Both vectors are unaffected.
*
* @param rightFactor the vector to cross with the current one (not null,
* unaffected)
Expand Down Expand Up @@ -374,8 +373,8 @@ public Object getZ() {
}

/**
* Test whether the squared length is within 1e-12 (single-precision) or
* 1e-24 (double-precision) of zero. The vector is unaffected.
* Test whether the squared length is within 10^-12 (single-precision) or
* 10^-24 (double-precision) of zero. The vector is unaffected.
*
* @return {@code true} if nearly zero, otherwise {@code false}
*/
Expand All @@ -390,7 +389,7 @@ public boolean isNearZero() {
* Test whether the squared length is within the specified tolerance of
* zero. The vector is unaffected.
*
* @param tolerance the desired tolerance (≥0)
* @param tolerance the desired tolerance (≥0, default=1e-12 or 1e-24)
* @return {@code true} if nearly zero, otherwise {@code false}
*/
@Override
Expand Down
20 changes: 9 additions & 11 deletions src/main/java/com/github/stephengold/joltjni/Vec3.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ public static Vec3 sZero() {
// Vec3Arg methods

/**
* Return the cross product with the specified vector. The current vector is
* unaffected.
* Return the cross product with the argument. Both vectors are unaffected.
*
* @param rightFactor the vector to cross with the current one (not null,
* unaffected)
Expand All @@ -550,8 +549,7 @@ public Vec3 cross(Vec3Arg rightFactor) {
}

/**
* Return the dot product with the specified vector. Both vectors are
* unaffected.
* Return the dot product with the argument. Both vectors are unaffected.
*
* @param factor the vector to dot with the current one (not null,
* unaffected)
Expand Down Expand Up @@ -679,7 +677,7 @@ public boolean isNan() {
}

/**
* Test whether the squared length is within 1e-12 of zero. The vector is
* Test whether the squared length is within 10^-12 of zero. The vector is
* unaffected.
*
* @return {@code true} if nearly zero, otherwise {@code false}
Expand All @@ -694,7 +692,7 @@ public boolean isNearZero() {
* Test whether the squared length is within the specified tolerance of
* zero. The vector is unaffected.
*
* @param tolerance the desired tolerance (≥0. default=1e-12)
* @param tolerance the desired tolerance (≥0, default=1e-12)
* @return {@code true} if nearly zero, otherwise {@code false}
*/
@Override
Expand Down Expand Up @@ -723,7 +721,7 @@ public boolean isNormalized() {
* Test whether the vector is normalized to within the specified tolerance.
* The vector is unaffected.
*
* @param tolerance the desired tolerance (default=1e-6)
* @param tolerance the desired tolerance (≥0, default=1e-6)
* @return {@code true} if normalized, otherwise {@code false}
*/
@Override
Expand Down Expand Up @@ -761,8 +759,8 @@ public float lengthSq() {
}

/**
* Generate a normalized vector with the same direction. The current vector
* is unaffected.
* Generate a unit vector with the same direction. The current vector is
* unaffected.
*
* @return a new vector
*/
Expand All @@ -774,8 +772,8 @@ public Vec3 normalized() {

/**
* Return a copy of the argument if the length of the current vector is
* zero. Otherwise, generate a normalized vector with the same direction as
* the current vector. The current vector is unaffected.
* zero. Otherwise, generate a unit vector with the same direction as the
* current vector. The current vector is unaffected.
*
* @param zeroValue the value to return if the length is zero (not null,
* unaffected)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2024 Stephen Gold
Copyright (c) 2024-2025 Stephen Gold
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,8 +34,7 @@ public interface RVec3Arg {
// new methods exposed

/**
* Return the cross product with the specified vector. The current vector is
* unaffected.
* Return the cross product with the argument. Both vectors are unaffected.
*
* @param rightFactor the vector to cross with the current one (not null,
* unaffected)
Expand All @@ -44,32 +43,32 @@ public interface RVec3Arg {
RVec3 cross(RVec3Arg rightFactor);

/**
* Return the first (X) component at positional precision. The vector is
* Return the first (X) component in positional precision. The vector is
* unaffected.
*
* @return the component value
*/
Object getX();

/**
* Return the 2nd (Y) component at positional precision. The vector is
* Return the 2nd (Y) component in positional precision. The vector is
* unaffected.
*
* @return the component value
*/
Object getY();

/**
* Return the 3rd (Z) component at positional precision. The vector is
* Return the 3rd (Z) component in positional precision. The vector is
* unaffected.
*
* @return the component value
*/
Object getZ();

/**
* Test whether the squared length is within 1e-12 (single-precision) or
* 1e-24 (double-precision) of zero. The vector is unaffected.
* Test whether the squared length is within 10^-12 (single-precision) or
* 10^-24 (double-precision) of zero. The vector is unaffected.
*
* @return {@code true} if nearly zero, otherwise {@code false}
*/
Expand All @@ -79,7 +78,7 @@ public interface RVec3Arg {
* Test whether the squared length is within the specified tolerance of
* zero. The vector is unaffected.
*
* @param tolerance the desired tolerance (≥0)
* @param tolerance the desired tolerance (≥0, default=1e-12 or 1e-24)
* @return {@code true} if nearly zero, otherwise {@code false}
*/
boolean isNearZero(double tolerance);
Expand Down
20 changes: 9 additions & 11 deletions src/main/java/com/github/stephengold/joltjni/readonly/Vec3Arg.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public interface Vec3Arg {
// new methods exposed

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

/**
* Return the dot product with the specified vector. Both vectors are
* unaffected.
* Return the dot product with the argument. Both vectors are unaffected.
*
* @param factor the vector to dot with the current one (not null,
* unaffected)
Expand Down Expand Up @@ -122,7 +120,7 @@ public interface Vec3Arg {
boolean isNan();

/**
* Test whether the squared length is within 1e-12 of zero. The vector is
* Test whether the squared length is within 10^-12 of zero. The vector is
* unaffected.
*
* @return {@code true} if nearly zero, otherwise {@code false}
Expand All @@ -133,7 +131,7 @@ public interface Vec3Arg {
* Test whether the squared length is within the specified tolerance of
* zero. The vector is unaffected.
*
* @param tolerance the desired tolerance (≥0. default=1e-12)
* @param tolerance the desired tolerance (≥0, default=1e-12)
* @return {@code true} if nearly zero, otherwise {@code false}
*/
boolean isNearZero(float tolerance);
Expand All @@ -150,7 +148,7 @@ public interface Vec3Arg {
* Test whether the vector is normalized to within the specified tolerance.
* The vector is unaffected.
*
* @param tolerance the desired tolerance (default=1e-6)
* @param tolerance the desired tolerance (≥0, default=1e-6)
* @return {@code true} if normalized, otherwise {@code false}
*/
boolean isNormalized(float tolerance);
Expand All @@ -170,17 +168,17 @@ public interface Vec3Arg {
float lengthSq();

/**
* Generate a normalized vector with the same direction. The current vector
* is unaffected.
* Generate a unit vector with the same direction. The current vector is
* unaffected.
*
* @return a new vector
*/
Vec3 normalized();

/**
* Return a copy of the argument if the length of the current vector is
* zero. Otherwise, generate a normalized vector with the same direction as
* the current vector. The current vector is unaffected.
* zero. Otherwise, generate a unit vector with the same direction as the
* current vector. The current vector is unaffected.
*
* @param zeroValue the value to return if the length is zero (not null,
* unaffected)
Expand Down

0 comments on commit 04f8ed3

Please sign in to comment.