开发:清理代码

erp_cdOption
ChenX 4 years ago
parent 5b14b26b40
commit 37e0ccb719

@ -587,14 +587,10 @@ export function MergeCurvelist(cus: Curve[])
return cus; return cus;
} }
export function SwapParam(res: IntersectResult[]) export function SwapParam(res: IntersectResult[]): IntersectResult[]
{ {
for (let r of res) for (let r of res)
{ [r.thisParam, r.argParam] = [r.argParam, r.thisParam];
let p = r.thisParam;
r.thisParam = r.argParam;
r.argParam = p;
}
return res; return res;
} }

@ -1,53 +0,0 @@
/**
* MathUtils contains auxiliar values and function to help with mathematical operations.
* @static
*/
export class MathUtils
{
/**
* Value of PI*2. 360 degrees.
*
* @attribute pi2
* @type {Number}
*/
static pi2 = 2 * Math.PI;
/**
* Value of PI/3. 60 degrees.
*
* @attribute pid3
* @type {Number}
*/
static pid3 = Math.PI / 3;
/**
* Value of PI/2. 45 degrees.
*
* @attribute pid2
* @type {Number}
*/
static pid2 = Math.PI / 2;
/**
* Generates a random color code.
*
* Uses the #RRGGBB format.
*
* @method randomColor
* @return {String} Generated color code.
*/
static randomColor()
{
var letters = "0123456789ABCDEF";
var color = "#";
for (var i = 0; i < 6; i++)
{
color += letters[Math.floor(Math.random() * 16)];
}
return color;
};
}
Loading…
Cancel
Save