Showing 19 of 28 total issues
Function _n4
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
const _n4 = function ( { col , pit } , points , take ) {
const n = points.length;
for ( let i = 0 ; i < n ; ++i ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _n2
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const _n2 = function ( { crs , dot } , points , take ) {
const n = points.length ;
each : for ( let j = 0 ; j < n ; ++j ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ch_online_add
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
var ch_online_add = function(ch, p){
if(ch.length == 0){
ch.push(p);
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function qhull
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const qhull = function* ( crs , lex , set , i , j , u , v , w ) {
let l = i - 1 ;
let r = j - 1 ;
let e = r ;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _n3
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const _n3 = function ( { crs , dot } , points , take ) {
const n = points.length ;
for ( let i = 0 ; i < n ; ++i ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function qhull
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const qhull = function* ( crs , lex , set , i , j , u , v , w ) {
let l = i - 1 ;
let r = j - 1 ;
let e = r ;
Function ch_online_add
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ch_online_add = function(ch, p){
if(ch.length == 0){
ch.push(p);
return;
}
Function binary_ext_sin_search
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
var binary_ext_sin_search = function(ch, l, r, o, p){
var i = o;
while(l < r){
i = Math.floor((r - l) / 2) + l;
var p_i = (i - 1) < 0 ? ch.length - 1: i - 1;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function jmarch
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const jmarch = function* ( crs , dot , points ) {
const n = points.length ;
const origin = points[0] ;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function qhull
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
const qhull = function* ( crs , lex , set , i , j , u , v , w ) {
Avoid deeply nested control flow statements. Open
if ( cos < 0 ) {
take[j] = false ;
continue each ;
}
Avoid deeply nested control flow statements. Open
if ( x === i || x === j || x === k || !take[x] ) continue ;
Avoid deeply nested control flow statements. Open
if ( sin2 > 0 ) v = c ;
Function gscanmono
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const gscanmono = function ( crs , points , i , j , lo ) {
const hi = [] ;
hi.push( points[i] ) ;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if ( pit( points[x], a, b, c ) ) take[x] = false ;
Function binary_ext_sin_search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var binary_ext_sin_search = function(ch, l, r, o, p){
Function gscanmono
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const gscanmono = function ( crs , points , i , j , lo ) {
Function chan
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const chan = function ( m , set , i , j , hull ) {
Function gscan
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const gscan = function ( crs , points , i , j , hull ) {