MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / normalise

Function normalise

examples/conway.rs:9–11  ·  view source on GitHub ↗
(a: &Array<f32>)

Source from the content-addressed store, hash-verified

7}
8
9fn normalise(a: &Array<f32>) -> Array<f32> {
10 a / (max_all(&abs(a)).0 as f32)
11}
12
13fn conways_game_of_life() {
14 let h_kernel = [1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0];

Callers 1

conways_game_of_lifeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected