1. Go to this page and download the library: Download tmilos/cgi-calc library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$rectangularProducer = new RectangularFromTwoPoints(new Point(0,0), new Point(3, 2), function (Point $point) {
// value provider for the points of the generated rectangular
return sprintf("%d : %d", $point->getX(), $point->getY());
});
$rect = $rectangularProducer->produce();
$rectangularProducer = new RectangularFromTwoPoints(new Point(2,3), 10, 8);
$rect = $rectangularProducer->produce();
$circleProducer = new CircularCenterRadius(new Point(10,10), 8);
$circle = $circleProducer->produce();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.