Skip to content

Commit

Permalink
account for NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Mar 9, 2024
1 parent 32d0c79 commit bfa445a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ function renderResult() {
outputColorValue.channels = outputColorValue.channels.map((channel) => channel * 255);
}

outputColorValue.channels = outputColorValue.channels.map((channel) => Number.isNaN(channel) ? 0 : channel);

outputChannel1Output.value = round(outputColorValue.channels[0]);
outputChannel2Output.value = round(outputColorValue.channels[1]);
outputChannel3Output.value = round(outputColorValue.channels[2]);
Expand Down

0 comments on commit bfa445a

Please sign in to comment.