abels-complex
Complex numbers with rectangular and polar representations
design decisions
ComplexPolar does not implicitly normalize (|z| >= 0 and -PI < Arg(z) >= PI)
no implicit conversions between rectangular and polar forms just to get back the original type
no_std support
no_std support can be enabled by compiling with --no-default-features to
disable std support and --features libm for math functions that are only
defined in std.
features
- [
approx] - traits and macros for approximate float comparisons - [
libm] - useslibmmath functions instead ofstd - [
glam] - implementsFrom<glam::Vec2> for ComplexandFrom<Complex> for glam::Vec2 - [
rand] - implementsrand::distr::Distribution<Complex> for rand::distr::StandardUniformandrand::distr::Distribution<ComplexPolar> for rand::distr::StandardUniform