From: Michael Munday Date: Mon, 25 Aug 2025 21:52:02 +0000 (+0100) Subject: math: rename Modf parameter int to integer X-Git-Tag: go1.26rc1~978 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3e596d448f;p=gostls13.git math: rename Modf parameter int to integer Avoid using int as a parameter name. Also, rename frac to fractional for consistency. Addresses comment on CL 694896: https://go-review.googlesource.com/c/go/+/694896/comment/a9723a07_8352e3aa/ Change-Id: Icedeecf65ad2f51d4e8d5bcf6e64c0eae9885dec Reviewed-on: https://go-review.googlesource.com/c/go/+/699035 Auto-Submit: Sean Liao Reviewed-by: Cherry Mui Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI Reviewed-by: Sean Liao Reviewed-by: Joel Sing --- diff --git a/src/math/modf.go b/src/math/modf.go index ab73e2dc36..12630958e9 100644 --- a/src/math/modf.go +++ b/src/math/modf.go @@ -11,8 +11,8 @@ package math // // Modf(±Inf) = ±Inf, NaN // Modf(NaN) = NaN, NaN -func Modf(f float64) (int float64, frac float64) { - int = Trunc(f) - frac = Copysign(f-int, f) +func Modf(f float64) (integer float64, fractional float64) { + integer = Trunc(f) + fractional = Copysign(f-integer, f) return }