Registry / utility / sma-rs

sma-rs

JSON →
library0.1.4rscratesunverified

Simple Moving Average (SMA) Implementation In Rust

# Cargo.toml [dependencies] sma-rs = "0.1.4"
INSTALL
IMPORT
SIG · SMA-RS
S
sma-rs
utilityrustv0.1.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SMA
use sma_rs::SMA;

Creates a simple moving average with a window of 3, adds values, and prints the average.

use sma_rs::SMA; fn main() { let mut sma = SMA::new(3); sma.add(1.0); sma.add(2.0); sma.add(3.0); println!("SMA: {}", sma.average()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
Resources
sma-rs — cargo add sma-rs · libregistry