Blender Git Loki

Git Commits -> Revision f886f29

Revision f886f29 by Moritz Röhrich (master)
December 10, 2021, 15:34 (GMT)
Fix T93591: Random Value node first and last value proportion

This patch replaces `round_fl_to_int` with `floor` and adjusts the
maximum value accordingly. The call to `round_fl_to_int` is problematic
here because it messes with the probability distribution at the edges
of the value range, meaning the first and last values were only half
as common as all other values. Since `round_fl_to_int` does
`floor(val + 0.5)`, it will not introduce misbehavior in edge cases.

Differential Revision: https://developer.blender.org/D13474

Commit Details:

Full Hash: f886f293550c275160a340b0815c48f1c9e23220
Parent Commit: 943aed0
Committed By: Hans Goudey
Lines Changed: +4, -2

1 Modified Path:

/source/blender/nodes/function/nodes/node_fn_random_value.cc (+4, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021