/* * DISTRHO Cardinal Plugin * Copyright (C) 2021-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of * the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * For a full copy of the GNU General Public License see the LICENSE file. */ #pragma once #include_next #include_next namespace std { static inline float max(const float a, const double b) { return std::max(a, static_cast(b)); } static inline std::complex operator*(const std::complex& a, const float b) { return static_cast>(a) * b; } static inline std::complex operator*(const float a, const std::complex& b) { return a * static_cast>(b); } static inline std::complex operator/(const std::complex& a, const std::complex& b) { return static_cast>(a) / b; } } // std::complex