Skip to content

Commit c885154

Browse files
committed
update: 更新矩阵的静态实用方法,增加矩阵文档内容
1 parent 8b82dfb commit c885154

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/top/zoyn/particlelib/utils/matrix/Matrixs.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,16 @@ public static Matrix rotate2D(double theta) {
7575
return new Matrix(m);
7676
}
7777

78+
/**
79+
* 建立一个放大或缩小的矩阵
80+
*
81+
* @param row 行数
82+
* @param column 列数
83+
* @param value 放大或缩小的值
84+
* @return {@link Matrix}
85+
*/
86+
public static Matrix scale(int row, int column, double value) {
87+
return ones(row, column).multiply(value);
88+
}
89+
7890
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* 存放矩阵的工具类
3+
*/
4+
package top.zoyn.particlelib.utils.matrix;

0 commit comments

Comments
 (0)