Complex




Complex number library written in and for C.

This simple C library allows you to easily manipulate complex numbers by creating math functions that are made specifically for complex numbers.



Features





Usage


To import the library, simply add #include "complex.h" to the file. All functions will be imported and you'll now be able to use the library.
The complex number data type is defined as complex_t, which is a struct with 2 long double data types: the real part and the imaginary part. Although it is possible to change the individual values of the complex_t data type, it is recommended to use the built-in functions.

In this documentation, complex_t means the complex data type, long double is a real number, and char* is a C null-terminated string. These are all the functions with the corresponding description and arguments: