diff --git a/libraries/script-engine/src/Vec3.h b/libraries/script-engine/src/Vec3.h
index 7887938004..86df912d0e 100644
--- a/libraries/script-engine/src/Vec3.h
+++ b/libraries/script-engine/src/Vec3.h
@@ -22,8 +22,8 @@
#include "GLMHelpers.h"
/**jsdoc
- * The Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed
- * Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction.
+ * The Vec3
API provides facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a
+ * right-handed Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction.
*
*
* @namespace Vec3
@@ -98,7 +98,7 @@ class Vec3 : public QObject, protected QScriptable {
public slots:
/**jsdoc
- * Calculate the reflection of a vector in a plane.
+ * Calculates the reflection of a vector in a plane.
* @function Vec3(0).reflect
* @param {Vec3} v - The vector to reflect.
* @param {Vec3} normal - The normal of the plane.
@@ -112,7 +112,7 @@ public slots:
glm::vec3 reflect(const glm::vec3& v1, const glm::vec3& v2) { return glm::reflect(v1, v2); }
/**jsdoc
- * Calculate the cross product of two vectors.
+ * Calculates the cross product of two vectors.
* @function Vec3(0).cross
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
@@ -126,7 +126,7 @@ public slots:
glm::vec3 cross(const glm::vec3& v1, const glm::vec3& v2) { return glm::cross(v1, v2); }
/**jsdoc
- * Calculate the dot product of two vectors.
+ * Calculates the dot product of two vectors.
* @function Vec3(0).dot
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
@@ -140,7 +140,7 @@ public slots:
float dot(const glm::vec3& v1, const glm::vec3& v2) { return glm::dot(v1, v2); }
/**jsdoc
- * Multiply a vector by a scale factor.
+ * Multiplies a vector by a scale factor.
* @function Vec3(0).multiply
* @param {Vec3} v - The vector.
* @param {number} scale - The scale factor.
@@ -149,7 +149,7 @@ public slots:
glm::vec3 multiply(const glm::vec3& v1, float f) { return v1 * f; }
/**jsdoc
- * Multiply a vector by a scale factor.
+ * Multiplies a vector by a scale factor.
* @function Vec3(0).multiply
* @param {number} scale - The scale factor.
* @param {Vec3} v - The vector.
@@ -158,7 +158,7 @@ public slots:
glm::vec3 multiply(float f, const glm::vec3& v1) { return v1 * f; }
/**jsdoc
- * Multiply two vectors.
+ * Multiplies two vectors.
* @function Vec3(0).multiplyVbyV
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
@@ -173,7 +173,7 @@ public slots:
glm::vec3 multiplyVbyV(const glm::vec3& v1, const glm::vec3& v2) { return v1 * v2; }
/**jsdoc
- * Rotate a vector.
+ * Rotates a vector.
* @function Vec3(0).multiplyQbyV
* @param {Quat} q - The rotation to apply.
* @param {Vec3} v - The vector to rotate.
@@ -187,7 +187,7 @@ public slots:
glm::vec3 multiplyQbyV(const glm::quat& q, const glm::vec3& v) { return q * v; }
/**jsdoc
- * Calculate the sum of two vectors.
+ * Calculates the sum of two vectors.
* @function Vec3(0).sum
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
@@ -196,7 +196,7 @@ public slots:
glm::vec3 sum(const glm::vec3& v1, const glm::vec3& v2) { return v1 + v2; }
/**jsdoc
- * Calculate one vector subtracted from another.
+ * Calculates one vector subtracted from another.
* @function Vec3(0).subtract
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
@@ -205,7 +205,7 @@ public slots:
glm::vec3 subtract(const glm::vec3& v1, const glm::vec3& v2) { return v1 - v2; }
/**jsdoc
- * Calculate the length of a vector
+ * Calculates the length of a vector
* @function Vec3(0).length
* @param {Vec3} v - The vector.
* @returns {number} The length of the vector.
@@ -213,7 +213,7 @@ public slots:
float length(const glm::vec3& v) { return glm::length(v); }
/**jsdoc
- * Calculate the distance between two points.
+ * Calculates the distance between two points.
* @function Vec3(0).distance
* @param {Vec3} p1 - The first point.
* @param {Vec3} p2 - The second point.
@@ -231,16 +231,17 @@ public slots:
float distance(const glm::vec3& v1, const glm::vec3& v2) { return glm::distance(v1, v2); }
/**jsdoc
- * Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector.
+ * Calculates the angle of rotation from one vector onto another, with the sign depending on a reference vector.
* @function Vec3(0).orientedAngle
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
* @param {Vec3} ref - Reference vector.
- * @returns {number} The angle of rotation from the first vector to the second, in degrees, with a positive sign if the
- * rotation axis aligns with the reference vector (has a positive dot product) otherwise a negative sign.
- * @example
Vec3.angle()
and Vec3.orientedAngle()
.Vec3.getAngle()
and Vec3.orientedAngle()
.1
.
+ * Normalizes a vector so that its length is 1
.
* @function Vec3(0).normalize
* @param {Vec3} v - The vector to normalize.
* @returns {Vec3} The vector normalized to have a length of 1
.
@@ -265,11 +266,11 @@ public slots:
glm::vec3 normalize(const glm::vec3& v) { return glm::normalize(v); };
/**jsdoc
- * Calculate a linear interpolation between two vectors.
+ * Calculates a linear interpolation between two vectors.
* @function Vec3(0).mix
* @param {Vec3} v1 - The first vector.
* @param {Vec3} v2 - The second vector.
- * @param {number} factor - The interpolation factor in the range 0.0
to 1.0
.
+ * @param {number} factor - The interpolation factor, range 0.0
– 1.0
.
* @returns {Vec3} The linear interpolation between the two vectors: (1 - factor) * v1 + factor * v2
.
* @example true
to be returned; it is often better to use {@link Vec3(0).withinEpsilon|withinEpsilon}.
+ * Tests whether two vectors are equal.
+ * Note: The vectors must be exactly equal in order for true
to be returned; it is often
+ * better to use {@link Vec3(0).withinEpsilon|withinEpsilon}.
Note: It is often better to use this function than {@link Vec3(0).equal|equal}.
* @function Vec3(0).withinEpsilon * @param {Vec3} v1 - The first vector. * @param {Vec3} v2 - The second vector. * @param {number} epsilon - The maximum distance between the two vectors. * @returns {boolean}true
if the distance between the points represented by the vectors is less than or equal
- * to the epsilon
, otherwise false
.
+ * to epsilon
, otherwise false
.
* @example x
elevation rotation about the x-axis in
- * radians, y
azimuth rotation about the y-axis in radians, and z
scale.
+ * radians, y
azimuth rotation about the y-axis in radians, and z
radius.
* @example x
elevation rotation about the x-axis in radians,
- * y
azimuth rotation about the y-axis in radians, and z
scale.
+ * y
azimuth rotation about the y-axis in radians, and z
radius.
* @returns {Vec3} The coordinates of the point.
* @example elevation
and azimuth
.
- * @example r
, red
.
* @property {number} y - Y-coordinate of the vector. Synonyms: g
, green
.
* @property {number} z - Z-coordinate of the vector. Synonyms: b
, blue
.
-* @example