OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
3 // | 3 // |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
7 // | 7 // |
8 | 8 |
9 part of charted.core.utils; | 9 part of charted.core.utils; |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 } else { | 93 } else { |
94 while ((j = start + step * ++i) < stop) { | 94 while ((j = start + step * ++i) < stop) { |
95 values.add(integers ? j ~/ k : j / k); | 95 values.add(integers ? j ~/ k : j / k); |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 return new Range._internal(start, stop, step, values); | 99 return new Range._internal(start, stop, step, values); |
100 } | 100 } |
101 | 101 |
102 Range._internal(this.start, this.stop, this.step, List values) | 102 Range._internal(this.start, this.stop, this.step, List<num> values) |
103 : super(values); | 103 : super(values); |
104 | 104 |
105 static int _integerConversionFactor(num val) { | 105 static int _integerConversionFactor(num val) { |
106 int k = 1; | 106 int k = 1; |
107 while (val * k % 1 > 0) { | 107 while (val * k % 1 > 0) { |
108 k *= 10; | 108 k *= 10; |
109 } | 109 } |
110 return k; | 110 return k; |
111 } | 111 } |
112 } | 112 } |
OLD | NEW |