Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m8s
All checks were successful
CI / Docker-Build (push) Successful in 2m8s
This commit is contained in:
commit
60ca381302
@ -1 +1 @@
|
||||
Subproject commit 56e1948393aa51e0bf16d754292a211f348df161
|
||||
Subproject commit e4c55ea4b6f9f5f875d59fc5bba51fc21bc8ef97
|
@ -637,9 +637,10 @@ export class Train extends JlGraphic {
|
||||
}
|
||||
const offset = this.states.headOffset / allLength; // 百分比偏移
|
||||
let offsetL = totalLength * offset;
|
||||
// 0.01为保证浮点数计算误差
|
||||
const indexP = lengths.findIndex((l) => {
|
||||
offsetL -= l;
|
||||
return offsetL <= 0;
|
||||
return offsetL <= 0.001;
|
||||
});
|
||||
const startP = points[indexP];
|
||||
const endP = points[indexP + 1];
|
||||
|
Loading…
Reference in New Issue
Block a user