コード例 #1
0
ファイル: MatrixRow.php プロジェクト: altgamer/portfolio
 public function __construct(Matrix $_matrix, $_row)
 {
     if (($row = (int) $_row) < 0 || $row >= $_matrix->u_size) {
         parent::__construct(0);
     } else {
         parent::__construct($_matrix->u_stride, $_matrix->u_stride * $row, $_matrix->u_data);
     }
 }
コード例 #2
0
ファイル: Vector2D.php プロジェクト: altgamer/portfolio
 public function __isset($_name)
 {
     switch ($_name) {
         case "x":
         case "X":
         case "y":
         case "Y":
             return true;
         default:
             return parent::__isset($_name);
     }
 }
コード例 #3
0
ファイル: Vector.php プロジェクト: altgamer/portfolio
 public function __construct($_length)
 {
     parent::__construct($_length);
 }