| xqd
@@ -111,11 +111,18 @@
|
|
|
this.$u.toast('两边之后要大于第三边');
|
|
|
return;
|
|
|
}
|
|
|
- left = (Math.pow(a,2) + Math.pow(c,2) - Math.pow(b,2)) / (2 * a * c)
|
|
|
- right = (Math.pow(b,2) + Math.pow(c,2) - Math.pow(a,2)) / (2 * b * c)
|
|
|
+ left = (Math.pow(b,2) + Math.pow(c,2) - Math.pow(a,2)) / (2 * b * c)
|
|
|
+ right = (Math.pow(a,2) + Math.pow(c,2) - Math.pow(b,2)) / (2 * a * c)
|
|
|
+ top = (Math.pow(a,2) + Math.pow(b,2) - Math.pow(c,2)) / (2 * a * b)
|
|
|
+
|
|
|
this.rules.left.value = this.$util.acos(left)
|
|
|
this.rules.right.value = this.$util.acos(right)
|
|
|
- this.rules.top.value = top = 180 - this.rules.left.value - this.rules.right.value
|
|
|
+ this.rules.top.value = this.$util.acos(top)
|
|
|
+
|
|
|
+
|
|
|
+ this.rules.left.value = this.rules.left.value > 90 ? Math.abs(180 - this.rules.left.value) : this.rules.left.value;
|
|
|
+ this.rules.left.value = this.rules.right.value > 90 ? Math.abs(180 - this.rules.right.value) : this.rules.left.value;
|
|
|
+ this.rules.left.value = this.rules.top.value > 90 ? Math.abs(180 - this.rules.top.value) : this.rules.left.value;
|
|
|
|
|
|
if(biangao){
|
|
|
if(this.formData.angle === '1'){ // 顶角
|