正弦,余弦 ,正切
Math.sin(30 * (2 * Math.PI / 360));/// 0.49999999999999994 正弦 二分之一Math.cos(30 * (2 * Math.PI / 360))// 0.8660254037844387 余弦 2分之根号3Math.sqrt(3) // 求根运算 1.73205080756887721.7320508075688772 * 1.7320508075688772// 2.9999999999999996Math.sqrt(3) / 2// 0.8660254037844386Math.tan(30 * (2 * Math.PI / 360)) // 0.5773502691896257 3分之根号3Math.sqrt(3) / 3 === Math.tan(30 * (2 * Math.PI / 360)) // true
function randomRange(min, max) { // min最小值,max最大值 return Math.floor(Math.random() * (max - min)) + min;}