Matrix
in package
FinalYes
Affine transformation matrix [a b c d e f].
Transforms a point: x' = ax + cy + e, y' = bx + dy + f
Table of Contents
Properties
Methods
- __construct() : mixed
- identity() : self
- multiply() : self
- rotate() : self
- scale() : self
- toArray() : array<int, float>
- transformPoint() : Point
- translate() : self
Properties
$a read-only
public
float
$a
= 1.0
$b read-only
public
float
$b
= 0.0
$c read-only
public
float
$c
= 0.0
$d read-only
public
float
$d
= 1.0
$e read-only
public
float
$e
= 0.0
$f read-only
public
float
$f
= 0.0
Methods
__construct()
public
__construct([float $a = 1.0 ][, float $b = 0.0 ][, float $c = 0.0 ][, float $d = 1.0 ][, float $e = 0.0 ][, float $f = 0.0 ]) : mixed
Parameters
- $a : float = 1.0
- $b : float = 0.0
- $c : float = 0.0
- $d : float = 1.0
- $e : float = 0.0
- $f : float = 0.0
identity()
public
static identity() : self
Return values
selfmultiply()
public
multiply(self $m) : self
Parameters
- $m : self
Return values
selfrotate()
public
rotate(float $degrees) : self
Parameters
- $degrees : float
Return values
selfscale()
public
scale(float $sx, float $sy) : self
Parameters
- $sx : float
- $sy : float
Return values
selftoArray()
public
toArray() : array<int, float>
Return values
array<int, float>transformPoint()
public
transformPoint(Point $p) : Point
Parameters
- $p : Point
Return values
Pointtranslate()
public
translate(float $tx, float $ty) : self
Parameters
- $tx : float
- $ty : float