Format old PHP files

This commit is contained in:
2022-01-14 10:48:52 +01:00
parent 0ad86228e9
commit 87df496efd
67 changed files with 1555 additions and 1528 deletions

View File

@@ -1,19 +1,19 @@
<?php
# Martin Hozik
# 24.5.2008
# doublethink.cleverweb.cz
declare(strict_types=1);
// Martin Hozik
// 24.5.2008
// doublethink.cleverweb.cz
class linear_perspective {
public $cam_location = ['x' => 10, 'y' => 0, 'z' => -240];
public $cam_rotation = ['x' => -1, 'y' => 0, 'z' => 0];
public $viewer_position = ['x' => 0, 'y' => -540, 'z' => -65];
public $cam_location = array('x' => 10, 'y' => 0, 'z' => -240);
public $cam_rotation = array('x' => -1, 'y' => 0, 'z' => 0);
public $viewer_position = array('x' => 0, 'y' => -540, 'z' => -65);
public function get_projection(array $point) {
$translation = array();
$projection = array();
$translation = [];
$projection = [];
$translation['x'] = cos($this->cam_rotation['y']) * (sin($this->cam_rotation['z']) * ($point['y'] - $this->cam_location['y']) + cos($this->cam_rotation['z']) * ($point['x'] - $this->cam_location['x'])) - sin($this->cam_rotation['y']) * ($point['z'] - $this->cam_location['z']);
$translation['y'] = sin($this->cam_rotation['x']) * (cos($this->cam_rotation['y']) * ($point['z'] - $this->cam_location['z']) + sin($this->cam_rotation['y']) * (sin($this->cam_rotation['z']) * ($point['y'] - $this->cam_location['y']) + cos($this->cam_rotation['z']) * ($point['x'] - $this->cam_location['x']))) + cos($this->cam_rotation['z']) * (cos($this->cam_rotation['z']) * ($point['y'] - $this->cam_location['y']) - sin($this->cam_rotation['z']) * ($point['x'] - $this->cam_location['x']));
@@ -25,4 +25,3 @@ class linear_perspective {
return $projection;
}
}
?>