Simple geometry lib with limited functionality, as a PHP extension