Skip to content

Commit 3e596d4

Browse files
Michael Mundaygopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Michael Pratt <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Sean Liao <[email protected]> Reviewed-by: Joel Sing <[email protected]>
1 parent 2a7f1d4 commit 3e596d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/math/modf.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ package math
1111
//
1212
// Modf(±Inf) = ±Inf, NaN
1313
// Modf(NaN) = NaN, NaN
14-
func Modf(f float64) (int float64, frac float64) {
15-
int = Trunc(f)
16-
frac = Copysign(f-int, f)
14+
func Modf(f float64) (integer float64, fractional float64) {
15+
integer = Trunc(f)
16+
fractional = Copysign(f-integer, f)
1717
return
1818
}

0 commit comments

Comments
 (0)