1 2 3 4 5 6 7 8 9 10 11 12 13
use std::ops::Neg; use super::UnaryTransform; /// v -> -v pub struct Negate; impl<T: Neg<Output = T>> UnaryTransform<T> for Negate { #[inline(always)] fn apply(value: T) -> T { -value } }