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