Skip to main content

moment_2d

Function moment_2d 

pub fn moment_2d(
    position_x: f64,
    position_y: f64,
    force_x: f64,
    force_y: f64,
) -> Option<f64>
Expand description

Computes the scalar z-moment of a planar force about a chosen point.

Formula: M = x * Fy - y * Fx. Positive values are counterclockwise by convention.

ยงExamples

use use_statics::moment_2d;

assert_eq!(moment_2d(2.0, 0.0, 0.0, 10.0), Some(20.0));