Ejemplo n.º 1
0
 public function ringSectorProvider()
 {
     $a1 = Angle::byDegrees(45);
     $a2 = Angle::byDegrees(135);
     $l1 = sin(\deg2rad(45)) * 100;
     $l2 = $l1 / 2;
     return array(array([[10 + $l1, 20 + $l1], [10 - $l1, 20 + $l1], [10 - $l2, 20 + $l2], [10 + $l2, 20 + $l2]], Points::ringSector(Point::create(10, 20), $a1, $a2, 100, 50)), array([[10 - $l1, 20 + $l1], [10 + $l1, 20 + $l1], [10 + $l2, 20 + $l2], [10 - $l2, 20 + $l2]], Points::ringSector(Point::create(10, 20), $a1, $a2, 100, 50, true)));
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider skewYProvider
  */
 public function testSkewY($x, $y, $cx, $cy, $degrees, $expectedX, $expectedY)
 {
     $this->assertEqualCoordinates($expectedX, $expectedY, Point::create($x, $y)->skewY(Point::create($cx, $cy), Angle::byDegrees($degrees)));
 }