|
raytracer
Parallel Ray Tracer written from scratch (no graphics API).
|
#include <complex.h>

Public Member Functions | |
| constexpr | Complex (const double _re, const double _im) |
| constexpr double | real_part () const |
| constexpr double | imaginary_part () const |
| constexpr Complex | squared () const |
| constexpr Complex | conjugate () const |
| double | magnitude () const |
| constexpr double | magnitude_squared () const |
| constexpr Complex | operator- () const |
| constexpr Complex | operator+ (Complex const &other) const |
| constexpr Complex | operator- (Complex const &other) const |
Public Attributes | |
| double | re |
| double | im |
Static Public Attributes | |
| static const Complex | ZERO = {0, 0} |
An imaginary number, with a real and an imaginary part. Both are doubles.
|
inlineconstexpr |

|
inlinenodiscardconstexpr |
Returns the complex conjugate of the complex number, with has the same real part and minus the imaginary part.

|
inlinenodiscardconstexpr |
Getter for the imaginary part of the complex number.
|
inlinenodiscard |
Returns the magnitude of the complex number, given by re^2 + im^2.
|
inlinenodiscardconstexpr |
Removes an expensive std::sqrt operation.

|
inlineconstexpr |


|
inlinenodiscardconstexpr |
Getter for the real part of the complex number.
|
inlinenodiscardconstexpr |
Returns the result of multiplying the complex number with itself.

| double raytracer::common::Complex::im |
| double raytracer::common::Complex::re |
|
inlinestaticconstexpr |
A complex number where both the real part and the imaginary part are set to zero.