Add constructor method

This commit is contained in:
sloop
2016-08-06 01:32:59 +08:00
parent aeaac3304e
commit f7a57c3b70

View File

@@ -24,6 +24,50 @@
## Matrix方法详解
### 构造方法
构造方法没有在上面表格中列出。
**无参构造**
```
Matrix ()
```
创建一个全新的Matrix使用格式如下
```
Matrix matrix = new Matrix();
```
通过这种方式创建出来的并不是一个数值全部为空的矩阵,而是一个单位矩阵,如下:
![](http://latex.codecogs.com/png.latex?
$$
\\left [
\\begin{matrix}
1 & 0 & 0 \\\\
0 & 1 & 0 \\\\
0 & 0 & 1
\\end{1}
\\right ]
$$)
**有参构造**
```
Matrix (Matrix src)
```
这种方法则需要一个已经存在的矩阵作为参数,如下:
```
Matrix matrix = new Matrix(src);
```
创建一个Matrix并对src深拷贝(理解为新的matrix和src是两个对象但内部数值相同即可)。
### 基本方法
基本方法内容比较简单,在此处简要介绍一下。
@@ -38,6 +82,7 @@ toShortString | 将Matrix转换为短字符串<br/>`[1.0, 0.0, 0.0][0.0, 1.0, 0.
### 数值操作
### 数值计算
### set pre 与 post