LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
36 if (
x.isNan() ||
y.isNan()) {
40 if (!
x.isNormalized() || !
y.isNormalized()) {
43 "invalid NormalizedAngleInterval endpoints");
68 return x._a >= _a ||
x._b <= _b;
70 return x._a >= _a &&
x._b <= _b;
80 return wraps() ? false : (
x._a > _b &&
x._b < _a);
83 return _a >
x._b && _b <
x._a;
85 return x._b < _a ||
x._a > _b;
91 return CONTAINS | DISJOINT | WITHIN;
93 return DISJOINT | WITHIN;
96 return CONTAINS | DISJOINT;
98 if (_a ==
x && _b ==
x) {
99 return CONTAINS | WITHIN;
112 return CONTAINS | DISJOINT | WITHIN;
114 return DISJOINT | WITHIN;
117 return CONTAINS | DISJOINT;
119 if (_a ==
x._a && _b ==
x._b) {
120 return CONTAINS | WITHIN;
126 if (_a <= x._a && _b >=
x._b) {
129 if (_a >=
x._a && _b <=
x._b) {
138 if (_a <= x._a || _b >=
x._b) {
141 return (_a >
x._b && _b <
x._a) ? DISJOINT : INTERSECTS;
148 if (
x._a <= _a ||
x._b >= _b) {
151 return (
x._a > _b &&
x._b < _a) ? DISJOINT : INTERSECTS;
154 if (_a <= x._a && _b >=
x._b) {
157 if (_a >=
x._a && _b <=
x._b) {
160 return (_a <= x._b && _b >=
x._a) ? INTERSECTS : DISJOINT;
183 }
else if (
x.isDisjointFrom(_a)) {
213 if (
wraps() !=
x.wraps()) {
221 }
else if (
isEmpty() ||
x.contains(_a)) {
245 if (
a <=
b) {
return full(); }
252 if (
a <=
b) {
return full(); }
256 if (
a <=
b) {
return full(); }
287 return os <<
'[' << i.
getA() <<
", " << i.
getB() <<
']';
NormalizedAngleInterval & expandTo(NormalizedAngle x)
NormalizedAngleInterval represents closed intervals of normalized angles, i.e.
bool isFull() const
isFull returns true if this interval contains all normalized angles.
NormalizedAngleInterval dilatedBy(Angle x) const
For positive x, dilatedBy returns the morphological dilation of this interval by [-x,...
NormalizedAngleInterval & clipTo(NormalizedAngle x)
clipTo shrinks this interval until all its points are in x.
bool isDisjointFrom(NormalizedAngle x) const
NormalizedAngleInterval()
This constructor creates an empty interval.
NormalizedAngle getAngleTo(NormalizedAngle const &a) const
getAngleTo computes the angle α ∈ [0, 2π) such that adding α to this angle and then normalizing the r...
bool isEmpty() const
isEmpty returns true if this interval does not contain any normalized angles.
static NormalizedAngleInterval empty()
bool wraps() const
wraps returns true if the interval "wraps" around the 0/2π angle discontinuity, i....
A base class for image defects.
static NormalizedAngleInterval full()
This file declares a class representing closed intervals of normalized angles, i.e....
bool contains(NormalizedAngle x) const
NormalizedAngle getA() const
getA returns the first endpoint of this interval.
NormalizedAngle getSize() const
getSize returns the size (length, width) of this interval.
bool intersects(NormalizedAngle x) const
Relationship relate(NormalizedAngle x) const
Angle represents an angle in radians.
std::ostream & operator<<(std::ostream &, Angle const &)
NormalizedAngle is an angle that lies in the range [0, 2π), with one exception - a NormalizedAngle ca...
NormalizedAngle getB() const
getB returns the second endpoint of this interval.