feat(Go-Tool):修复bitstore计算position问题
This commit is contained in:
@@ -78,7 +78,7 @@ func (bitStore *BitStore) getGearListLength(gear int) int {
|
|||||||
|
|
||||||
//获取档位所在的二进制位置
|
//获取档位所在的二进制位置
|
||||||
func (bitStore *BitStore) getGearPosition(gear, length int) int {
|
func (bitStore *BitStore) getGearPosition(gear, length int) int {
|
||||||
return gear - (bit-1)*(length-1) - 1
|
return (gear - 1) % (bit - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bitStore *BitStore) getSizeOrInit() int {
|
func (bitStore *BitStore) getSizeOrInit() int {
|
||||||
|
|||||||
Reference in New Issue
Block a user