Simple trend detection for Rust.
Compare two ordered values and classify the result as:
Trend::RisingTrend::FallingTrend::Stable
use trends::TrendExt;
let trend = 10.to_trend(&20);
assert!(trend.is_rising());
assert_eq!(trend.direction(), 1);Works with any T: Ord.