pub fn plane_inclusive_sum<E: CubePrimitive>(value: E) -> E
Expand description
Perform an inclusive sum operation across all units in a plane. This sums all values to the “left” of the unit, including this unit’s value. Also known as “prefix sum” or “inclusive scan”.
§Example
inclusive_sum([1, 2, 3, 4, 5]) == [1, 3, 6, 10, 15]