Rollback initial arc support merge (was integrated into upstream/master’s SVG improvements change)

This commit is contained in:
Christopher Kohnert 2017-06-08 11:54:19 -07:00
parent 2ef81f598d
commit bb8f03e6e2
2 changed files with 0 additions and 21 deletions

View File

@ -49,23 +49,6 @@ Vector2 Vector2::project(const Vector2 &vector, bool positive) const {
return t*n;
}
Vector2 Vector2::rotateAround(const Vector2 &center, double angleDegree) const {
Vector2 result = *this - center;
double s = std::sin(angleDegree * M_PI / 180);
double c = std::cos(angleDegree * M_PI / 180);
result.x = result.x * c - result.y * s;
result.y = result.x * s + result.y * c;
return result + center;
}
Vector2 Vector2::rotate(double angleDegree) const {
double s = std::sin(angleDegree * M_PI / 180);
double c = std::cos(angleDegree * M_PI / 180);
double newX = x * c - y * s;
double newY = x * s + y * c;
return Vector2(newX, newY);
}
Vector2::operator const void*() const {
return x || y ? this : NULL;
}

View File

@ -35,10 +35,6 @@ struct Vector2 {
Vector2 getOrthonormal(bool polarity = true, bool allowZero = false) const;
/// Returns a vector projected along this one.
Vector2 project(const Vector2 &vector, bool positive = false) const;
/// Returns a vector that is rotated by the angle around a center
Vector2 rotateAround(const Vector2 &center, double angleDegree) const;
/// Returns a vector that is rotated by the angle around the origin
Vector2 rotate(double angleDegree) const;
operator const void *() const;
bool operator!() const;
bool operator==(const Vector2 &other) const;