summaryrefslogtreecommitdiff
path: root/src/pkg/math/floor.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/floor.go')
-rw-r--r--src/pkg/math/floor.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/math/floor.go b/src/pkg/math/floor.go
index 96532acbd..2acf1e042 100644
--- a/src/pkg/math/floor.go
+++ b/src/pkg/math/floor.go
@@ -8,15 +8,15 @@ package math
// Floor returns the greatest integer value less than or equal to x.
func Floor(x float64) float64 {
if x < 0 {
- d, fract := Modf(-x);
+ d, fract := Modf(-x)
if fract != 0.0 {
d = d + 1
}
- return -d;
+ return -d
}
- d, _ := Modf(x);
- return d;
+ d, _ := Modf(x)
+ return d
}
// Ceil returns the least integer value greater than or equal to x.
-func Ceil(x float64) float64 { return -Floor(-x) }
+func Ceil(x float64) float64 { return -Floor(-x) }