mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
Rename UniformRandom to UnitRandom.
This commit is contained in:
parent
7a9d9cde94
commit
0ba32f99bd
@ -271,7 +271,7 @@ public:
|
|||||||
explicit inline Quaternion(const Quaternion<OtherScalar, OtherOptions>& other)
|
explicit inline Quaternion(const Quaternion<OtherScalar, OtherOptions>& other)
|
||||||
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
|
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
|
||||||
|
|
||||||
static Quaternion UniformRandom();
|
static Quaternion UnitRandom();
|
||||||
|
|
||||||
template<typename Derived1, typename Derived2>
|
template<typename Derived1, typename Derived2>
|
||||||
static Quaternion FromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b);
|
static Quaternion FromTwoVectors(const MatrixBase<Derived1>& a, const MatrixBase<Derived2>& b);
|
||||||
@ -616,7 +616,7 @@ inline Derived& QuaternionBase<Derived>::setFromTwoVectors(const MatrixBase<Deri
|
|||||||
* \note The implementation is based on http://planning.cs.uiuc.edu/node198.html
|
* \note The implementation is based on http://planning.cs.uiuc.edu/node198.html
|
||||||
*/
|
*/
|
||||||
template<typename Scalar, int Options>
|
template<typename Scalar, int Options>
|
||||||
Quaternion<Scalar,Options> Quaternion<Scalar,Options>::UniformRandom()
|
Quaternion<Scalar,Options> Quaternion<Scalar,Options>::UnitRandom()
|
||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
using std::sin;
|
using std::sin;
|
||||||
|
@ -156,8 +156,8 @@ template<typename Scalar, int Options> void quaternion(void)
|
|||||||
Quaternionx *q = new Quaternionx;
|
Quaternionx *q = new Quaternionx;
|
||||||
delete q;
|
delete q;
|
||||||
|
|
||||||
q1 = Quaternionx::UniformRandom ();
|
q1 = Quaternionx::UnitRandom();
|
||||||
q2 = Quaternionx::UniformRandom ();
|
q2 = Quaternionx::UnitRandom();
|
||||||
check_slerp(q1,q2);
|
check_slerp(q1,q2);
|
||||||
|
|
||||||
q1 = AngleAxisx(b, v1.normalized());
|
q1 = AngleAxisx(b, v1.normalized());
|
||||||
@ -168,7 +168,7 @@ template<typename Scalar, int Options> void quaternion(void)
|
|||||||
q2 = AngleAxisx(-b, -v1.normalized());
|
q2 = AngleAxisx(-b, -v1.normalized());
|
||||||
check_slerp(q1,q2);
|
check_slerp(q1,q2);
|
||||||
|
|
||||||
q1 = Quaternionx::UniformRandom ();
|
q1 = Quaternionx::UnitRandom();
|
||||||
q2.coeffs() = -q1.coeffs();
|
q2.coeffs() = -q1.coeffs();
|
||||||
check_slerp(q1,q2);
|
check_slerp(q1,q2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user