Added SAtom::s

This commit is contained in:
Weird Constructor 2021-10-10 09:09:39 +02:00
parent 9835ceb66e
commit bce7dfebe9

View file

@ -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,