Class Power


  • public class Power
    extends Module
    Noise module that raises the output value from a first source module to the power of the output value from a second source module.

    The first source module must have an index value of 0.

    The second source module must have an index value of 1.

    Source Modules
    This module requires 2 source modules.
    • Constructor Detail

      • Power

        public Power()
      • Power

        public Power​(Module base,
                     Module exponent)
        Create a new Power module with the source modules pre-configured.
        Parameters:
        base - the base
        exponent - the exponent to raise the base to
    • Method Detail

      • getValue

        public double getValue​(double x,
                               double y,
                               double z)
        Description copied from class: Module
        Generates an output value given the coordinates of the specified input value.

        All source modules required by this module must have been connected with the Module.setSourceModule(int, Module) method. If these source modules are not connected, this method will throw a NoModuleException.

        To determine the number of source modules required by this noise module, call the Module.getSourceModuleCount() method.

        Specified by:
        getValue in class Module
        Parameters:
        x - the x coordinate of the input value
        y - the y coordinate of the input value
        z - the z coordinate of the input value
        Returns:
        the output value