File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1510
1510
1511
1511
interval(double _min, double _max) : min(_min), max(_max) {}
1512
1512
1513
+ double size() const {
1514
+ return max - min;
1515
+ }
1516
+
1513
1517
bool contains(double x) const {
1514
1518
return min < = x && x < = max;
1515
1519
}
1521
1525
static const interval empty, universe;
1522
1526
};
1523
1527
1524
- const static interval empty (+infinity, -infinity);
1525
- const static interval universe(-infinity, +infinity);
1528
+ const interval interval:: empty = interval (+infinity, -infinity);
1529
+ const interval interval:: universe = interval (-infinity, +infinity);
1526
1530
1527
1531
#endif
1528
1532
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -21,11 +21,6 @@ class interval {
21
21
return max - min;
22
22
}
23
23
24
- interval expand (double delta) const {
25
- auto padding = delta/2 ;
26
- return interval (min - padding, max + padding);
27
- }
28
-
29
24
bool contains (double x) const {
30
25
return min <= x && x <= max;
31
26
}
You can’t perform that action at this time.
0 commit comments