Optimizations for better usage of XS code

This commit is contained in:
Alessandro Ranellucci 2013-08-29 01:36:42 +02:00
parent 9254ff9704
commit 5d6fd7f4d9
22 changed files with 68 additions and 42 deletions

View file

@ -36,6 +36,12 @@ Line::length() const
return this->a.distance_to(&(this->b));
}
Point*
Line::midpoint() const
{
return new Point ((this->a.x + this->b.x) / 2.0, (this->a.y + this->b.y) / 2.0);
}
void
Line::from_SV(SV* line_sv)
{