Callable object computing a complex or a general Cayley-Dickson from a polar representation.
namespace eve
{
template<eve::floating_ordered_value T0, eve::floating_ordered_value T1>,
auto from_polar( T0 rho, T1 theta)
const noexcept;
template<eve::floating_ordered_value T0, eve::floating_ordered_value T1, kyosu::concepts::cayley_dickson C>,
auto from_polar( T0 rho, T1 theta, C iz)
const noexcept;
}
constexpr tags::callable_from_polar from_polar
Callable object computing a complex or a general Cayley-Dickson from a polar representation.
Definition: from_polar.hpp:106
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <array>
#include <iostream>
int main()
{
auto theta = eve::pio_3(eve::as<double>());
auto rho = 3.0;
std::cout << " <- theta = " << theta << std::endl;
std::cout << " <- rho = " << rho << std::endl;
std::cout <<
" -> " <<
from_polar(theta, rho) <<
"\n";
std::cout <<
" -> " <<
from_polar(theta, rho, iz0) <<
"\n";
std::cout <<
" -> " <<
from_polar(theta, rho, iz1) <<
"\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
constexpr tags::callable_quaternion quaternion
Constructs a kyosu::quaternion.
Definition: to_quaternion.hpp:72
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition: quaternion.hpp:27
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27