Skip to content

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

License

Notifications You must be signed in to change notification settings

woodruffw/Complex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages