SH4ZAM! 0.1.0
Fast math library for the Sega Dreamcast's SH4 CPU
Loading...
Searching...
No Matches
shz_complex.hpp File Reference
#include "shz_complex.h"
Include dependency graph for shz_complex.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  shz::complex
 

Namespaces

namespace  shz
 

Typedefs

using shz::complex_t
 

Functions

Global Operators

Globally-defined overloaded operators.

complex shz::operator+ (complex lhs, complex rhs) noexcept
 
complex shz::operator- (complex lhs, complex rhs) noexcept
 
complex shz::operator* (complex lhs, complex rhs) noexcept
 
complex shz::operator* (complex lhs, float rhs) noexcept
 
complex shz::operator/ (complex lhs, complex rhs) noexcept
 
complex shz::operator/ (complex lhs, float rhs) noexcept
 
bool shz::operator== (complex lhs, complex rhs) noexcept
 
bool shz::operator!= (complex lhs, complex rhs) noexcept
 
Basic

Basic operations on complex numbers.

complex shz::cinitf (float real, float imag) noexcept
 
complex shz::cpolarf (float r, float theta) noexcept
 
bool shz::cequalf (complex lhs, complex rhs) noexcept
 
float shz::crealf (complex c) noexcept
 
float shz::cimagf (complex c) noexcept
 
Arithmetic

Arithmetic operations on complex numbers.

complex shz::caddf (complex lhs, complex rhs) noexcept
 
complex shz::csubf (complex lhs, complex rhs) noexcept
 
complex shz::cmulf (complex lhs, complex rhs) noexcept
 
complex shz::cdivf (complex lhs, complex rhs) noexcept
 
complex shz::cscalef (complex lhs, float v) noexcept
 
complex shz::crecipf (complex c) noexcept
 
Manipulation

Extract or modify complex components.

float shz::cabsf (complex c) noexcept
 
float shz::inv_cabsf (complex c) noexcept
 
float shz::cnormf (complex c) noexcept
 
float shz::cargf (complex c) noexcept
 
complex shz::conjf (complex c) noexcept
 
complex shz::cprojf (complex c) noexcept
 
Transcendental

Complex transcendental functions.

complex shz::csqrtf (complex c) noexcept
 
complex shz::cpowf (complex base, complex exp) noexcept
 
complex shz::cexpf (complex c) noexcept
 
complex shz::clogf (complex c) noexcept
 
complex shz::clog10f (complex c) noexcept
 
Spherical Trigonometry

Complex spherical trigonometric functions.

complex shz::csinf (complex c) noexcept
 
complex shz::ccosf (complex c) noexcept
 
complex shz::ctanf (complex c) noexcept
 
complex shz::ccscf (complex c) noexcept
 
complex shz::csecf (complex c) noexcept
 
complex shz::ccotf (complex c) noexcept
 
complex shz::casinf (complex c) noexcept
 
complex shz::cacosf (complex c) noexcept
 
complex shz::catanf (complex c) noexcept
 
complex shz::cacscf (complex c) noexcept
 
complex shz::casecf (complex c) noexcept
 
complex shz::cacotf (complex c) noexcept
 
Hyperbolic Trigonometry

Complex hyperbolic trigonometric functions.

complex shz::csinhf (complex c) noexcept
 
complex shz::ccoshf (complex c) noexcept
 
complex shz::ctanhf (complex c) noexcept
 
complex shz::ccschf (complex c) noexcept
 
complex shz::csechf (complex c) noexcept
 
complex shz::ccothf (complex c) noexcept
 
complex shz::casinhf (complex c) noexcept
 
complex shz::cacoshf (complex c) noexcept
 
complex shz::catanhf (complex c) noexcept
 
complex shz::cacschf (complex c) noexcept
 
complex shz::casechf (complex c) noexcept
 
complex shz::cacothf (complex c) noexcept
 
Signal Processing

Functions for processing complex signals.

void shz::fft (shz_complex_t *s, size_t size) noexcept
 

Detailed Description

Complex number C++ API.

This file contains the C++ layer for wrapping the Complex Number C API. The major thing that it adds in C++ is convenient overloaded operators for performing arithmetic on complex numbers using the regular arithmetic operators, rather than having to make function calls which implement them, as in C.

Author
2026 Falco Girgis
Todo
  • custom literals
  • array index accessors?
  • iterator support?

Definition in file shz_complex.hpp.