MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / cross_product

Function cross_product

src/math/vector_cross_product.rs:13–18  ·  view source on GitHub ↗

Cross Product and Magnitude Calculation This program defines functions to calculate the cross product of two 3D vectors and the magnitude of a vector from its direction ratios. The main purpose is to demonstrate the mathematical concepts and provide test cases for the functions. Time Complexity: - Calculating the cross product and magnitude of a vector each takes O(1) time since we are working w

(vec1: [f64; 3], vec2: [f64; 3])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls

no outgoing calls