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 }
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;
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
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);
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);
Single character variable names affect code readability and complicate code refactoring, because of the difficulty in searching and replacing single characters.
This issue will not be raised for certain special identifiers, such as i
, j
or n
. It will also not be reported for the parameters used in for
and while
loops.
var a;
const l = 90
var age;
const limit = 90;
for(let o = 2; o < 10; o++){
sum += o
}