public double getValue ( double p ) { if ( module == null ) { throw new NoModuleException ( ) ; } double x = ( x1 - x0 ) * p + x0 ; double y = ( y1 - y0 ) * p + y0 ; double z = ( z1 - z0 ) * p + z0 ; double value = module . getValue ( x , y , z ) ; if ( attenuate ) { return p * ( 1.0 - p ) * 4 * value ; } else { return value ; } }
Returns the output value from the noise module given the one - dimensional coordinate of the specified input value located on the line segment .