Ero sivun ”Widget:JwCurrentCharts” versioiden välillä
Järvi-meriwikistä
Rivi 631: | Rivi 631: | ||
if ( ic > 0 ) { | if ( ic > 0 ) { | ||
dist = Math.sqrt( 40.5 ) / Math.sqrt( Math.pow( (4.5-col), 2 ) + Math.pow( (4.5-row), 2 ) ); | dist = Math.sqrt( 40.5 ) / Math.sqrt( Math.pow( (4.5-col), 2 ) + Math.pow( (4.5-row), 2 ) ); | ||
− | total = ( iavg/2 * Math.pow( dist, 0.25 ) ); | + | total = ( iavg/2 * Math.pow( dist, 0.25 ) ) + 0.5; |
random = ( Math.random() > 0.5 ); | random = ( Math.random() > 0.5 ); | ||
if ( ( total > 0.5 && random ) ) { | if ( ( total > 0.5 && random ) ) { |