Skip to content

Commit 9406c86

Browse files
authored
Documented range of Vector3 angle_between. (#523)
The returned value is semantically different from the 2D version.
1 parent c6f4da4 commit 9406c86

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

codegen/templates/vec.rs.tera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ impl {{ self_t }} {
19951995
angle * math::signum(self.perp_dot(rhs))
19961996
}
19971997
{% elif dim == 3 %}
1998-
/// Returns the angle (in radians) between two vectors.
1998+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
19991999
///
20002000
/// The inputs do not need to be unit vectors however they must be non-zero.
20012001
#[inline]

src/f32/coresimd/vec3a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ impl Vec3A {
819819
Self(self.0.mul_add(a.0, b.0))
820820
}
821821

822-
/// Returns the angle (in radians) between two vectors.
822+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
823823
///
824824
/// The inputs do not need to be unit vectors however they must be non-zero.
825825
#[inline]

src/f32/neon/vec3a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ impl Vec3A {
861861
Self(unsafe { vfmaq_f32(b.0, self.0, a.0) })
862862
}
863863

864-
/// Returns the angle (in radians) between two vectors.
864+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
865865
///
866866
/// The inputs do not need to be unit vectors however they must be non-zero.
867867
#[inline]

src/f32/scalar/vec3a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ impl Vec3A {
864864
)
865865
}
866866

867-
/// Returns the angle (in radians) between two vectors.
867+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
868868
///
869869
/// The inputs do not need to be unit vectors however they must be non-zero.
870870
#[inline]

src/f32/sse2/vec3a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ impl Vec3A {
869869
)
870870
}
871871

872-
/// Returns the angle (in radians) between two vectors.
872+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
873873
///
874874
/// The inputs do not need to be unit vectors however they must be non-zero.
875875
#[inline]

src/f32/vec3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ impl Vec3 {
854854
)
855855
}
856856

857-
/// Returns the angle (in radians) between two vectors.
857+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
858858
///
859859
/// The inputs do not need to be unit vectors however they must be non-zero.
860860
#[inline]

src/f32/wasm32/vec3a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ impl Vec3A {
832832
)
833833
}
834834

835-
/// Returns the angle (in radians) between two vectors.
835+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
836836
///
837837
/// The inputs do not need to be unit vectors however they must be non-zero.
838838
#[inline]

src/f64/dvec3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ impl DVec3 {
854854
)
855855
}
856856

857-
/// Returns the angle (in radians) between two vectors.
857+
/// Returns the angle (in radians) between two vectors in the range `[0, +π]`.
858858
///
859859
/// The inputs do not need to be unit vectors however they must be non-zero.
860860
#[inline]

0 commit comments

Comments
 (0)