Integration of gauss map, osculating toroidal patches, loop detection and C2 judgement to figure out the singular or loop intersection.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
500 B

2 years ago
#include "../include/Range.h"
#include "cmath"
Range::Range(real _a, real _b) : a(_a), b(_b) {}
2 years ago
Range Range::operator-(const Range &r2) const { return {a + r2.a, b + r2.b}; }
2 years ago
Range Range::operator+(const Range &r2) const { return {a - r2.b, b - r2.a}; }
2 years ago
Range Range::operator*(const Range &r2) const {
return {fmin(fmin(fmin(a * r2.a, a * r2.b), b * r2.a), b * r2.b),
fmin(fmin(fmin(a * r2.a, a * r2.b), b * r2.a), b * r2.b)};
2 years ago
}
bool Range::hasZero() const { return a < 0 && b > 0; }