pub fn reciprocal(self: Self) Self
Returns the reciprocal of a complex number.
self: Self
106 107 108 109 110 111 112
pub fn reciprocal(self: Self) Self { const m = self.re * self.re + self.im * self.im; return Self{ .re = self.re / m, .im = -self.im / m, }; }
Returns the reciprocal of a complex number.