Skip to content
/ Complex Public

Simple library to parse and work with complex numbers

License

Notifications You must be signed in to change notification settings

vk1994/Complex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complex

Simple library to parse and work with complex numbers

Usage

The library can be used for calculations on complex numbers. It follows the structure a+bi, where a is real part and b is imaginary part. It can parse complex numbers of following structure: 1+2i, -6i, 7.2+3.5i, 10, i

As of now it can add, subtract, multiply and divide complex numbers.

Sample

demo.cpp

#include<iostream>
#include "Complex.h"
using namespace std;

int main(){
  Complex c1("3.5+5i");
  Complex c2("10+7i");
  
  cout<<c1+c2<<'\n'; //13.5+12i
  
  return 0;
}

About

Simple library to parse and work with complex numbers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages