清理代码格式

pull/MERGE
cx 6 years ago
parent 603e21c9ab
commit c3a5421b71

@ -25,13 +25,13 @@ export class Singleton
*/
static GetInstance<T>(Class: { new(): T; }): T
{
let obj = this.singletonMap.get(Class);
if (!obj)
let instance = this.singletonMap.get(Class);
if (!instance)
{
obj = new Class();
this.singletonMap.set(Class, obj);
instance = new Class();
this.singletonMap.set(Class, instance);
}
return obj;
return instance;
}
/**

@ -615,9 +615,9 @@ export class Arc extends Curve
let pts = [this.StartPoint, this.EndPoint];
let [sp, ep] = pts;
let OldChordLengthHalf = sp.distanceTo(ep) * 0.5;
let oldChordLengthHalf = sp.distanceTo(ep) * 0.5;
let arcHeight = OldChordLengthHalf * this.Bul;
let arcHeight = oldChordLengthHalf * this.Bul;
pts[index].add(vec);

@ -1042,14 +1042,14 @@ export class Polyline extends Curve
let notChangeP = this.GetPointAtParam(nextIndex);
//原先的弦长的一半
let OldChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5;
let oldChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5;
//弓高
let arcHeight = OldChordLengthHalf * d.bul;
let arcHeight = oldChordLengthHalf * d.bul;
needChangeP.add(vec);
let newChordLengthHalf = (needChangeP.distanceTo(notChangeP) * 0.5);
let newChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5;
d.bul = arcHeight / newChordLengthHalf;
}

Loading…
Cancel
Save