An open API service indexing awesome lists of open source software.

https://github.com/woodruffw/complex

An implementation of complex numbers and their mathematical requirements in Java.
https://github.com/woodruffw/complex

Last synced: 29 days ago
JSON representation

An implementation of complex numbers and their mathematical requirements in Java.

Awesome Lists containing this project

README

          

Complex
========

### What is Complex?

Complex is very simple!

It's an implementation of complex numbers (you know, a + bi), something that Java has been sorely lacking.

All together, it's only three files:

- Complex.java - The Complex type itself. Stores real and imaginary parts as doubles, offers some conversion/equality/output functions, and that's it.
- ComplexMath.java - Some basic mathematical functions, reworked to function with the Complex type. Includes add, subtract, multiply, divide, pow, and so forth.
- ComplexConversionException.java - A RuntimeException subclass designed to shout at you if you try to convert a Complex into a primitive.

### How efficient is it?

Honestly, I don't know.

### How do I use it?

Just copy Complex's three files (mentioned above) into your project.
No libraries or packages are required.
Complex's comments also contain JavaDoc tags, so feel free to generate your own documentation.