未验证 提交 4a762b38 编写于 作者: 1 189******51 提交者: Gitee

IssueNo: #I7X5WW:[新需求]: Rectify the arkts syntax of qs on monthly

Description: Rectify the arkts syntax of qs on monthly
Sig: SIG_ApplicaitonFramework
Feature or Bugfix: Feature
Binary Source: No
Signed-off-by: N189******51 <lipeicheng5@huawei.com>
上级 97ad9022
...@@ -101,7 +101,7 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect ...@@ -101,7 +101,7 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect
let result = new PointVector([]) let result = new PointVector([])
const len = Math.min(this.length, rhs.length) const len = Math.min(this.length, rhs.length)
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
result.push(this[i].plus(rhs[i])) result.push((this as Array<Point>)[i].plus((rhs as Array<Point>)[i]))
} }
return result return result
} }
...@@ -109,14 +109,14 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect ...@@ -109,14 +109,14 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect
let result = new PointVector([]) let result = new PointVector([])
const len = Math.min(this.length, rhs.length) const len = Math.min(this.length, rhs.length)
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
result.push(this[i].subtract(rhs[i])) result.push((this as Array<Point>)[i].subtract((rhs as Array<Point>)[i]))
} }
return result return result
} }
multiply(scale: number): PointVector { multiply(scale: number): PointVector {
let result = new PointVector([]) let result = new PointVector([])
for (let i = 0; i < this.length; i++) { for (let i = 0; i < this.length; i++) {
result.push(this[i].multiply(scale)) result.push((this as Array<Point>)[i].multiply(scale))
} }
return result return result
} }
...@@ -125,14 +125,14 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect ...@@ -125,14 +125,14 @@ class PointVector extends Array<Point> implements AnimatableArithmetic<PointVect
return false return false
} }
for (let i = 0; i < this.length; i++) { for (let i = 0; i < this.length; i++) {
if (!this[i].equals(rhs[i])) { if (!(this as Array<Point>)[i].equals((rhs as Array<Point>)[i])) {
return false return false
} }
} }
return true return true
} }
get():Array<[x: number, y: number]> { get(): Array<Object[]> {
let result = [] let result: Array<Object[]> = []
this.forEach(p => result.push([p.x, p.y])) this.forEach(p => result.push([p.x, p.y]))
return result return result
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册