14 #ifndef __UT_COMPLEX__
15 #define __UT_COMPLEX__
49 UT_ComplexT &
operator=(
const UT_ComplexT &);
53 UT_ComplexT
operator+(
const UT_ComplexT &)
const;
56 UT_ComplexT
operator-(
const UT_ComplexT &)
const;
59 UT_ComplexT
operator*(
const UT_ComplexT &)
const;
61 UT_ComplexT
operator/(
const UT_ComplexT &)
const;
68 T real()
const {
return myReal; }
102 template <
typename T>
106 myReal = source.
real();
110 template <
typename T>
118 template <
typename T>
122 myReal = source.
real();
128 template <
typename T>
138 template <
typename T>
145 template <
typename T>
152 template <
typename T>
159 template <
typename T>
166 template <
typename T>
173 template <
typename T>
180 template <
typename T>
190 myReal * i + myImag * r);
193 template <
typename T>
203 mag = SYSpow(mag, exp);
207 #define UT_COMPLEX_SINCOS
208 #ifdef UT_COMPLEX_SINCOS
210 SYSsincos(phs, &s, &c);
213 return UT_ComplexT( mag * SYScos(phs), mag * SYSsin(phs));
217 template <
typename T>
224 template <
typename T>
236 (myImag * r - myReal * i)/d);
239 template <
typename T>
243 return SYSsqrt(myReal*myReal + myImag *myImag);
246 template <
typename T>
250 return myReal*myReal + myImag *myImag;
253 template <
typename T>
257 return SYSatan(-myImag, myReal);
Mat3< typename promote< S, T >::type > operator*(S scalar, const Mat3< T > &m)
Multiply each element of the given matrix by scalar and return the result.
GA_API const UT_StringHolder div
UT_ComplexT operator*(T) const
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Mat3< typename promote< T0, T1 >::type > operator+(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Add corresponding elements of m0 and m1 and return the result.
UT_ComplexT< fpreal64 > UT_Complex
UT_ComplexT operator+(T) const
GLboolean GLboolean GLboolean GLboolean a
UT_ComplexT< fpreal32 > UT_ComplexF
UT_ComplexT pow(T exp) const
ImageBuf OIIO_API pow(const ImageBuf &A, cspan< float > B, ROI roi={}, int nthreads=0)
ImageBuf OIIO_API sub(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Mat3< typename promote< T0, T1 >::type > operator-(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Subtract corresponding elements of m0 and m1 and return the result.
UT_ComplexT< fpreal64 > UT_ComplexD
int operator==(const UT_ComplexT &) const
GLsizei GLsizei GLchar * source
#define SYS_DECLARE_IS_POD(T)
Declare a type as POD.
UT_ComplexT operator/(T) const
UT_ComplexT & operator=(const UT_ComplexT &)
UT_ComplexT(const UT_Vector2T< T > &vec)
LeafData & operator=(const LeafData &)=delete
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
bool SYSisEqual(const UT_Vector2T< T > &a, const UT_Vector2T< T > &b, S tol=SYS_FTOLERANCE)
Componentwise equality.
UT_ComplexT operator-() const
IMATH_HOSTDEVICE constexpr Quat< T > operator/(const Quat< T > &q1, const Quat< T > &q2) IMATH_NOEXCEPT
Quaterion division.
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.