Search results
Results from the WOW.Com Content Network
The traditional flood-fill algorithm takes three parameters: a start node, a target color, and a replacement color. The algorithm looks for all nodes in the array that are connected to the start node by a path of the target color and changes them to the replacement color.
For example, the calculation x 0 may produce the result 1, even where x is NaN, so checking only the final result would obscure the fact that a calculation before the x 0 resulted in a NaN. In general, then, a later test for a set invalid flag is needed to detect all cases where NaNs are introduced [ 3 ] (see Function definition below for ...