#include <BTypes.h>
#include <complex>
#include <algorithm>
This is based on the Standard C++ library complex class and has all of the functionality of that class.