Sindarius / npm_gcodeviewer

Found single char variable name JS-C1002
Anti-pattern
Minor
3 months agoa year old
Variable name is too small
 928   }
 929
 930   chunk(arr, chunkSize) {
 931      var R = []; 932      for (var i = 0, len = arr.length; i < len; i += chunkSize) R.push(arr.slice(i, i + chunkSize));
 933      return R;
 934   }
Variable name is too small
473   updateToolPosition(position) { 
474      let x = 0; 
475      let y = 0; 
476      let z = 0; 477      this.buildtoolCursor(); 
478      if (position instanceof Vector3) { 
479         x = position.x; 
Variable name is too small
 42    let midPoint = this.start.add(this.end).divide(VECDIV2); 
 43 
 44    let v = this.end.subtract(this.start); 
 45    let r = Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2) + Math.pow(v.z, 2));  46    let phi = Math.atan2(v.z, v.x); 
 47    let theta = Math.acos(v.y / r); 
 48 
Variable name is too small
 41    let length = this.length() + padding; 
 42    let midPoint = this.start.add(this.end).divide(VECDIV2); 
 43 
 44    let v = this.end.subtract(this.start);  45    let r = Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2) + Math.pow(v.z, 2)); 
 46    let phi = Math.atan2(v.z, v.x); 
 47    let theta = Math.acos(v.y / r); 
Variable name is too small
 36  //This method is used to calculate the matrix used to visualize with meshes like cube and cylinder 
 37  renderLinev4(nozzleSize = 0.4, padding = 0){ 
 38    if(this.layerHeight === 0) {this.layerHeight = this.start.y; } 
 39    let p = {};  40     
 41    let length = this.length() + padding; 
 42    let midPoint = this.start.add(this.end).divide(VECDIV2);