Commit a03757e4 authored by Hixie's avatar Hixie

Operators needed to lerp a FractionalOffset.

Without this, you can't use AnimatedValue<FractionalOffset>, because its
lerp() function uses the operators.
parent 1e8fa404
......@@ -1110,6 +1110,15 @@ class FractionalOffset {
const FractionalOffset(this.x, this.y);
final double x;
final double y;
FractionalOffset operator -(FractionalOffset other) {
return new FractionalOffset(x - other.x, y - other.y);
}
FractionalOffset operator +(FractionalOffset other) {
return new FractionalOffset(x + other.x, y + other.y);
}
FractionalOffset operator *(double other) {
return new FractionalOffset(x * other, y * other);
}
bool operator ==(dynamic other) {
if (other is! FractionalOffset)
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment