MCPcopy Create free account
hub / github.com/Notgnoshi/generative / length

Method length

generative/dla.rs:232–234  ·  view source on GitHub ↗
(v: &[f64; 2])

Source from the content-addressed store, hash-verified

230 }
231
232 fn length(v: &[f64; 2]) -> f64 {
233 (v[0] * v[0] + v[1] * v[1]).sqrt()
234 }
235 fn norm(v: &[f64; 2]) -> [f64; 2] {
236 let l = Model::length(v);
237 [v[0] / l, v[1] / l]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected