File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/app/services/analytics/origin-destination/components Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 99 computeShortestPaths ,
1010 topoSort ,
1111} from "src/app/view/util/origin-destination-graph" ;
12+ import { MathUtils } from "../../../../utils/math" ;
1213
1314// Computed values for an origin/destination pair.
1415export type OriginDestination = {
@@ -115,9 +116,9 @@ export class OriginDestinationService {
115116 destination : destination . getBetriebspunktName ( ) ,
116117 originId : origin . getId ( ) ,
117118 destinationId : destination . getId ( ) ,
118- travelTime : totalCost - connections * connectionPenalty ,
119- transfers : connections ,
120- totalCost : totalCost ,
119+ travelTime : MathUtils . round ( totalCost - connections * connectionPenalty , 10 ) ,
120+ transfers : MathUtils . round ( connections , 10 ) ,
121+ totalCost : MathUtils . round ( totalCost , 10 ) ,
121122 found : true ,
122123 } ;
123124 rows . push ( row ) ;
You can’t perform that action at this time.
0 commit comments