/** * Adds a point. * * @param Point $point * @return The copied point. */ protected function addPoint(Point $point) { return $this->points[] = $point->copy(); }
public function testTranslate() { $this->assertEqualCoordinates(25, 25, Point::create(20.5, 10)->translate(4.5, 15)); }
public function scaleXProvider() { return array(array([[-10, 20], [-10, 100], [-110, 100], [-110, 20]], Points::rectangle(Point::create(10, 20), 100, 80)->scaleX(Point::create(0, 0), -1)), array([[10, 20], [10, 100], [60, 100], [60, 20]], Points::rectangle(Point::create(10, 20), 100, 80, true)->scaleX(Point::create(10, 20), 0.5))); }