From c79c9dac8d2142b5e71eea2e8abf79bdeb3e15c0 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 3 Jul 2025 23:04:16 +0200 Subject: [PATCH] Inline `r / complex` for complex numbers fixed. --- lib/std/math/complex.c3 | 2 +- releasenotes.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/math/complex.c3 b/lib/std/math/complex.c3 index de09d7752..96d87df9e 100644 --- a/lib/std/math/complex.c3 +++ b/lib/std/math/complex.c3 @@ -43,7 +43,7 @@ macro Complex Complex.sub_each(self, Real b) => { .v = self.v - b }; macro Complex Complex.scale(self, Real r) @operator_s(*) => { .v = self.v * r }; macro Complex Complex.mul(self, Complex b)@operator(*) => { self.r * b.r - self.c * b.c, self.r * b.c + b.r * self.c }; macro Complex Complex.div_real(self, Real r) @operator(/) => { .v = self.v / r }; -macro Complex Complex.div_real_inverse(Complex c, Real r) @operator_r(/) => ((Complex) { .r = self }).div(c); +macro Complex Complex.div_real_inverse(Complex c, Real r) @operator_r(/) => ((Complex) { .r = r }).div(c); macro Complex Complex.div(self, Complex b) @operator(/) { Real div = b.v.dot(b.v); diff --git a/releasenotes.md b/releasenotes.md index 3c2da1510..b7c289025 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -20,6 +20,7 @@ - Fix issue with labelled break inside of a $switch. - Non-const macros may not return untyped lists. - `$for` ct-state not properly popped. +- Inline `r / complex` for complex numbers fixed. ### Stdlib changes