aureooms/js-cg

View on GitHub

Showing 42 of 42 total issues

Function __convex__ has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

var __convex__ = function ( ccwc ) {

    var convex = function ( a, i, j ) {

        var x, y, z, k, n;
Severity: Minor
Found in js/src/d2/pred/convex.js - About 5 hrs to fix

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 __convex__ has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var __convex__ = function ( ccwc ) {

    var convex = function ( a, i, j ) {

        var x, y, z, k, n;
Severity: Major
Found in js/src/d2/pred/convex.js - About 2 hrs to fix

    Function convex has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var convex = function ( a, i, j ) {
    
            var x, y, z, k, n;
    
            n = j - i;
    Severity: Major
    Found in js/src/d2/pred/convex.js - About 2 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      var cossign = function ( x , y , z ) {
          return ( y[0] - x[0] ) * ( y[0] - z[0] ) +
                 ( y[1] - x[1] ) * ( y[1] - z[1] ) ;
      } ;
      Severity: Major
      Found in js/src/d2/pred/cossign.js and 1 other location - About 2 hrs to fix
      js/src/d2/pred/sinsign.js on lines 33..38

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 80.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      var sinsign = function ( a , b , c ) {
      
          return ( b[0] - a[0] ) * ( c[1] - a[1] ) -
                 ( b[1] - a[1] ) * ( c[0] - a[0] ) ;
      
      
      Severity: Major
      Found in js/src/d2/pred/sinsign.js and 1 other location - About 2 hrs to fix
      js/src/d2/pred/cossign.js on lines 40..43

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 80.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var rightbottom = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/rightbottom.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var leftbottom = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/leftbottom.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var topleft = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/topleft.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var topright = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/topright.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var righttop = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/righttop.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var lefttop = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/lefttop.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var bottomright = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/bottomright.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomleft.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

      var bottomleft = function ( compare ) {
      
          return function ( a, b ) {
      
              var d;
      Severity: Major
      Found in js/src/d2/clockwise/bottomleft.js and 7 other locations - About 2 hrs to fix
      js/src/d2/clockwise/bottomright.js on lines 2..18
      js/src/d2/clockwise/leftbottom.js on lines 2..18
      js/src/d2/clockwise/lefttop.js on lines 2..18
      js/src/d2/clockwise/rightbottom.js on lines 2..18
      js/src/d2/clockwise/righttop.js on lines 2..18
      js/src/d2/clockwise/topleft.js on lines 2..18
      js/src/d2/clockwise/topright.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 78.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if ( k === j ) {
                      k = i;
                      z = a[k];
      
                      if ( !ccwc( x, y, z ) ) {
      Severity: Major
      Found in js/src/d2/pred/convex.js and 2 other locations - About 1 hr to fix
      js/src/d2/pred/convex.js on lines 34..46
      js/src/d2/pred/convex.js on lines 56..68

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if ( k === j ) {
                      k = i;
                      y = a[k];
      
                      if ( !ccwc( z, x, y ) ) {
      Severity: Major
      Found in js/src/d2/pred/convex.js and 2 other locations - About 1 hr to fix
      js/src/d2/pred/convex.js on lines 34..46
      js/src/d2/pred/convex.js on lines 78..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                  if ( k === j ) {
                      k = i;
                      x = a[k];
      
                      if ( !ccwc( y, z, x ) ) {
      Severity: Major
      Found in js/src/d2/pred/convex.js and 2 other locations - About 1 hr to fix
      js/src/d2/pred/convex.js on lines 56..68
      js/src/d2/pred/convex.js on lines 78..90

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      var __counterclockwise__ = function ( sinsign, cossign, u ) {
      
          return function ( a, b ) {
      
              var sin;
      Severity: Major
      Found in js/src/d2/clockwise/counterclockwise.js and 1 other location - About 1 hr to fix
      js/src/d2/clockwise/clockwise.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 66.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      var __clockwise__ = function ( sinsign, cossign, u ) {
      
          return function ( a, b ) {
      
              var sin;
      Severity: Major
      Found in js/src/d2/clockwise/clockwise.js and 1 other location - About 1 hr to fix
      js/src/d2/clockwise/counterclockwise.js on lines 2..18

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 66.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function rayshoot has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      let rayshoot = function ( d , m , A , b , z , r ) {
      
          let i = 0 ;
          let j = m ;
          let w ;
      Severity: Minor
      Found in js/src/dn/rayshoot.js - About 1 hr to fix

      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 det3 has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      var det3 = function ( A00 , A01 , A02 , A10 , A11 , A12 , A20 , A21 , A22 ) {
      Severity: Major
      Found in js/src/d2/op/det3.js - About 1 hr to fix
        Severity
        Category
        Status
        Source
        Language