Browse Source

fix(controller): 过墙弯修正

xiansin 3 years ago
parent
commit
2c551ff474
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pages/formula/guoqiangwan.vue

+ 2 - 2
pages/formula/guoqiangwan.vue

xqd
@@ -80,8 +80,8 @@
                  1、 斜边=底边×1.414
                  2、 切口=边高×0.828
                  */
-                this.rules.xiebian.value = this.formData.dibian * 1.414
-                this.rules.slice.value = this.formData.biangao * 0.828
+                this.rules.xiebian.value = this.formData.dibian *  (this.$util.tan(45/2)+1);
+                this.rules.slice.value = this.formData.biangao *  this.$util.tan(45/2)*2;
                 // 1、 起弯=长-底边
                 if(this.formData.length){
                     this.rules.qiwan.value = this.formData.length - this.formData.dibian