MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ try_scalar()

std::optional< double > MayaFlux::Core::InputValue::try_scalar ( ) const
noexcept

Safe scalar extraction.

Returns
Value, or std::nullopt if this is not a SCALAR.

Definition at line 261 of file InputBinding.cpp.

262{
263 if (type != Type::SCALAR)
264 return std::nullopt;
265 return std::get<double>(data);
266}
@ SCALAR
Single normalized float [-1.0, 1.0] or [0.0, 1.0].
std::variant< double, std::vector< double >, std::vector< uint8_t >, MIDIMessage, OSCMessage > data

References data, SCALAR, and type.