Comments (5)
Line 235 in 56c0fb5
最后加的那个0.5是不是放错位置了。Floor函数返回的已经是一个整数值,在加 0.5 后,会被最外层的 int64() 截断吧
+0.5 是为了向上取整
from aegis.
Line 235 in 56c0fb5
最后加的那个0.5是不是放错位置了。Floor函数返回的已经是一个整数值,在加 0.5 后,会被最外层的 int64() 截断吧
+0.5 是为了向上取整
加错位置了吧,应该先加 0.5 再进行 Floor 操作吧
from aegis.
why not use math.Ceil()
to get value greater than or equal to x ?
the comment for Ceil
// Ceil returns the least integer value greater than or equal to x.
//
// Special cases are:
// Ceil(±0) = ±0
// Ceil(±Inf) = ±Inf
// Ceil(NaN) = NaN
func Ceil(x float64) float64
from aegis.
not same with +0.5
from aegis.
Related Issues (11)
- [BUG] Invalid number of arguments?
- lastAppendTime设置可能会延迟 HOT 1
- Kata 容器中获取的CPU Limit 值错误 HOT 4
- window.Bucket为什么不直接使用数值类型统计 HOT 4
- minRT in bbr may be wrong HOT 1
- Limiter 接口 Allow() 方法是否考虑传入 ctx 和 req HOT 4
- 直接用CPU的值做判断
- pointer arithmetic result points to invalid allocation in the murmur
- bbr 限流算法部分为什么没有排空逻辑? HOT 1
- breaker&limiter api definition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aegis.