getReverse() public method

Create a new instance with reversed point order, i. e. reversed direction.
public getReverse ( ) : Line
return Line
Beispiel #1
0
 public function testGetReverseWorksAsExpected()
 {
     $point1 = new Coordinate(52.5, 13.5);
     $point2 = new Coordinate(64.09999999999999, -21.9);
     $line = new Line($point1, $point2);
     $reversedLine = $line->getReverse();
     $expected = new Line($point2, $point1);
     $this->assertEquals($expected, $reversedLine);
 }