From bce7dfebe9af3681a5924ee3ac918c0a0c73cab9 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Sun, 10 Oct 2021 09:09:39 +0200 Subject: [PATCH] Added SAtom::s --- src/dsp/satom.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dsp/satom.rs b/src/dsp/satom.rs index 94aa9cc..d437bca 100644 --- a/src/dsp/satom.rs +++ b/src/dsp/satom.rs @@ -47,6 +47,13 @@ impl SAtom { } } + pub fn s(&self) -> String { + match self { + SAtom::Str(s) => s.clone(), + _ => "".to_string(), + } + } + pub fn f(&self) -> f32 { match self { SAtom::Setting(i) => *i as f32,