mruby-complex: add parentheses to Math method calls

added parentheses to Math.hypot and Math.atan2 calls where the return
value is used.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-12-04 20:56:27 +09:00
parent 6b2d0b3e0f
commit 676ab238a2
+2 -2
View File
@@ -97,7 +97,7 @@ class Complex < Numeric
# Complex(3.0, -4.0).abs #=> 5.0
#
def abs
Math.hypot imaginary, real
Math.hypot(imaginary, real)
end
alias_method :magnitude, :abs
@@ -125,7 +125,7 @@ class Complex < Numeric
# Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966
#
def arg
Math.atan2 imaginary, real
Math.atan2(imaginary, real)
end
alias_method :angle, :arg
alias_method :phase, :arg