diff --git a/dir_12c6a5b07df34aef879622d954c76196.html b/dir_12c6a5b07df34aef879622d954c76196.html index a4cb311b..b4b3ecc4 100644 --- a/dir_12c6a5b07df34aef879622d954c76196.html +++ b/dir_12c6a5b07df34aef879622d954c76196.html @@ -130,6 +130,8 @@ Directories directory  complex   +directory  quaternion diff --git a/dir_afb7ef6c7507f2c05327abc9a8754bf2.html b/dir_afb7ef6c7507f2c05327abc9a8754bf2.html new file mode 100644 index 00000000..32fa3324 --- /dev/null +++ b/dir_afb7ef6c7507f2c05327abc9a8754bf2.html @@ -0,0 +1,143 @@ + + + + + + + + +kyosu: kyosu/types/impl/quaternion Directory Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
kyosu v0.1.0 +
+
Complex Without Complexes
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
quaternion Directory Reference
+
+
+
+
+ + + + + + + + + + diff --git a/group__functions.html b/group__functions.html index 761cba3f..5dd2b66e 100644 --- a/group__functions.html +++ b/group__functions.html @@ -6,7 +6,7 @@ -kyosu: cayley Functions +kyosu: Cayley-Dickson Functions @@ -124,11 +124,11 @@
Variables
-
cayley Functions
+
Cayley-Dickson Functions
-

Functions performing computations over all cayley-dicson types, complex, quaternions and octonions... +

Functions performing computations over all caylet-dickson types complex, quaternions, octonions... More...

+ + + @@ -271,6 +274,9 @@ + + + @@ -368,6 +374,9 @@ + + + diff --git a/group__functions_ga4f655a16c878099303a59697347bce41.html b/group__functions_ga4f655a16c878099303a59697347bce41.html new file mode 100644 index 00000000..4ae34c35 --- /dev/null +++ b/group__functions_ga4f655a16c878099303a59697347bce41.html @@ -0,0 +1,233 @@ + + + + + + + + +kyosu: kyosu::is_unitary + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

@@ -184,6 +184,9 @@

constexpr tags::callable_dist kyosu::dist = {}
 Computes the distance between the two parameters.
 
constexpr tags::callable_dot kyosu::dot = {}
 Computes elementwise the dot product of the coordinates of the corresponding element.
 
constexpr tags::callable_exp kyosu::exp = {}
 Computes the exponential of the argument.
 
constexpr tags::callable_is_real kyosu::is_real = {}
 test if the parameter is real.
 
constexpr tags::callable_is_unitary kyosu::is_unitary = {}
 test if the parameter is unitary (absolute value one).
 
constexpr tags::callable_jpart kyosu::jpart = {}
 Extracts the \(j\) part of a value.
 
constexpr tags::callable_sinpicospi kyosu::sinpicospi = {}
 Computes simultaneously the sine and cosine of the argument in \(\pi\) mutiples.
 
constexpr tags::callable_slerp kyosu::slerp = {}
 Computes the spherical interpolation between unitary quaternions.
 
constexpr tags::callable_sqr kyosu::sqr = {}
 Computes the square value.
 
+ + + + + + + +
+
kyosu v0.1.0 +
+
Complex Without Complexes
+
+ +   + + + + +
+
+
+ + + + + +
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +

◆ is_unitary

+ +
+
+ + + + + +
+ + + + +
kyosu::is_unitary = {}
+
+inlineconstexpr
+
+ +

test if the parameter is unitary (absolute value one).

+

Defined in Header

+
#include <kyosu/functions.hpp>
+

Callable Signatures

+
namespace kyosu
+
{
+
template<kyosu::concepts::cayley_dickson T> constexpr auto is_unitary(T z) noexcept;
+
template<eve::ordered_value T> constexpr auto is_unitary(T z) noexcept;
+
}
+
constexpr tags::callable_is_unitary is_unitary
test if the parameter is unitary (absolute value one).
Definition: is_unitary.hpp:74
+
Main KYOSU namespace.
Definition: arg.hpp:13
+

Parameters

+
    +
  • z : Value to process.
  • +
+

Return value

+

Returns elementwise true if an element is of absolute value one.

+
Note
As for now is_unitary accepts almost equality (will change when decorators will be at hand in kyosu)
+

Example

+
#include <kyosu/kyosu.hpp>
+
#include <eve/wide.hpp>
+
#include <iostream>
+
+
int main()
+
{
+ + + +
using e_t = float;
+
using c_t = complex<float>;
+
using q_t = quaternion<float>;
+
using we_t = eve::wide<e_t, eve::fixed<2>>;
+
using wc_t = eve::wide<c_t, eve::fixed<2>>;
+
using wq_t = eve::wide<q_t, eve::fixed<2>>;
+
+
std::cout << "Real: \n";
+
e_t e(72.9f);
+
we_t we = we_t(e);
+
e_t ue = kyosu::sign(e);
+
we_t uwe = kyosu::sign(we);
+
std::cout << e << " -> " << is_unitary(e) << "\n";
+
std::cout << we << " -> " << is_unitary(we) << "\n";
+
std::cout << ue << " -> " << is_unitary(ue) << "\n";
+
std::cout << uwe << " -> " << is_unitary(uwe) << "\n";
+
+
std::cout << "Complex: \n";
+
c_t c(3.5f,-2.9f);
+
wc_t wc = wc_t(c);
+
c_t uc = kyosu::sign(c);
+
wc_t uwc = kyosu::sign(wc);
+
std::cout << c << " -> " << is_unitary(c) << "\n";
+
std::cout << wc << " -> " << is_unitary(wc) << "\n";
+
std::cout << uc << " -> " << is_unitary(uc) << "\n";
+
std::cout << uwc << " -> " << is_unitary(uwc) << "\n";
+
+
std::cout << "Quaternion: \n";
+
q_t q(3.5f,-2.9f, 2.1f, 3.2f);
+
wq_t wq = wq_t(q);
+
q_t uq = kyosu::sign(q);
+
wq_t uwq = kyosu::sign(wq);
+
std::cout << q << " -> " << is_unitary(q) << "\n";
+
std::cout << wq << " -> " << is_unitary(wq) << "\n";
+
std::cout << uq << " -> " << is_unitary(uq) << "\n";
+
std::cout << uwq << " -> " << is_unitary(uwq) << "\n";
+
+
return 0;
+
}
+
constexpr tags::callable_sign sign
Computes tne normalized value z/abs(z) if z is not zero else 0.
Definition: sign.hpp:75
+
cayley_dickson< T, 4 > quaternion
Type alias for quaternion numbers.
Definition: quaternion.hpp:26
+
cayley_dickson< T, 2 > complex
Type alias for complex numbers.
Definition: complex.hpp:26
+
+
+
+
+
+ + + + + + + + + + diff --git a/group__functions_ga660e094a5a7d9c646c30eeb9273ef80a.html b/group__functions_ga660e094a5a7d9c646c30eeb9273ef80a.html new file mode 100644 index 00000000..b8cbb3ca --- /dev/null +++ b/group__functions_ga660e094a5a7d9c646c30eeb9273ef80a.html @@ -0,0 +1,184 @@ + + + + + + + + +kyosu: kyosu::slerp + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
kyosu v0.1.0 +
+
Complex Without Complexes
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +

◆ slerp

+ +
+
+ + + + + +
+ + + + +
kyosu::slerp = {}
+
+inlineconstexpr
+
+ +

Computes the spherical interpolation between unitary quaternions.

+

Defined in Header

+
#include <kyosu/functions.hpp>
+

Callable Signatures

+
namespace kyosu
+
{
+
template<kyosu::concepts::cayley_dickson T0, kyosu::concepts::cayley_dickson T1 > constexpr auto slerp(T0 z0, T1, z1, auto eve::ordered_value t) noexcept;
+
template<eve::ordered_value T0, kyosu::concepts::cayley_dickson T1> > constexpr auto slerp(T0 z0, T1, z1, auto eve::ordered_value t) noexcept;
+
template<kyosu::concepts::cayley_dickson T0, eve::ordered_value T1 > constexpr auto slerp(T0 z0, T1, z1, auto eve::ordered_value t) noexcept;
+
template<eve::ordered_value T0, ordered_value T1> > constexpr auto slerp(T0 z0, T1, z1, auto eve::ordered_value t) noexcept;
+
! }
+
constexpr tags::callable_slerp slerp
Computes the spherical interpolation between unitary quaternions.
Definition: slerp.hpp:82
+
Main KYOSU namespace.
Definition: arg.hpp:13
+

Parameters

+
    +
  • z0, z1 : unitary quaternions to process.
  • +
  • t : floating value interpolation coefficient.
  • +
+

Return value

+

The value of the spherical interpolation (or extrapolation) between z0 and z1 is returned. The functions asserts if the quaternions are not unitary.

+

Example

+
+
+
+
+
+ + + + + + + + + + diff --git a/group__functions_ga6f78a4312ac7bd38e25d0b09b18fe3e6.html b/group__functions_ga6f78a4312ac7bd38e25d0b09b18fe3e6.html index 31f1efae..ef3d552c 100644 --- a/group__functions_ga6f78a4312ac7bd38e25d0b09b18fe3e6.html +++ b/group__functions_ga6f78a4312ac7bd38e25d0b09b18fe3e6.html @@ -151,7 +151,7 @@

template<kyosu::concepts::cayley_dickson T> constexpr T sqrt(T z) noexcept;
template<eve::ordered_value T> constexpr T sqrt(T z) noexcept;
}
-
constexpr tags::callable_sqrt sqrt
Computes a square root value.
Definition: sqrt.hpp:79
+
constexpr tags::callable_sqrt sqrt
Computes a square root value.
Definition: sqrt.hpp:78
Main KYOSU namespace.
Definition: arg.hpp:13

Parameters