#include "BasicInterpolator.h" #include "Block.h" Block *BasicInterpolator::interpolateBlocks( Block *a, Block *b, double aWeight, double bWeight, Noise *zNoise ) { if( aWeight < bWeight ) return interpolateBlocks( b, a, bWeight, aWeight, zNoise ); double score = bWeight / aWeight; if( score < 0.8 ) { b->release(); return a; } score = ( score - 0.8 ) * 5; if( score < zNoise->getNoise( ( score + 60 ) * 5, 100, 50 ) ) { b->release(); return a; } a->release(); return b; }