File indexing completed on 2024-12-15 04:01:13
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <vector> 0010 0011 namespace glaxnimate::math { 0012 0013 0014 /** 0015 * \brief Returns the real roots of 0016 * a x^3 + b x^2 + c x + d = 0 0017 */ 0018 std::vector<double> cubic_roots(double a, double b, double c, double d); 0019 0020 /** 0021 * \brief Returns the real roots of 0022 * a x^2 + b x + c = 0 0023 */ 0024 std::vector<double> quadratic_roots(double a, double b, double c); 0025 0026 } // namespace glaxnimate::math