## Install Asset

### Install via Godot

To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser

## Quick Information

Functions on GDScript for finding real roots of polynomial equations of degree up to 4 (quartic).UsageFunctions take a value of type float and return a sorted array of real roots. If there are no roots, return an empty array.Examplesfunc example():var roots: Array[float] = Equation.quartic_solve_real(1, -10, 35, -50, 24)print(roots) # Prints "[1, 2, 3, 4]"roots = Equation.cubic_solve_real(2, -11, 12, 9)print(roots) # Prints "[-0.5, 3]"Functions in current versionlinear_solve_real(a: float, b: float) -> Array[float]quadratic_solve_real(a: float, b: float, c: float) -> Array[float]cubic_solve_real(a: float, b: float, c: float, d: float) -> Array[float]quartic_solve_real(a: float, b: float, c: float, d: float, e: float) -> Array[float]WarningArguments that are too large or small can lead to inaccurate answers.

Functions on GDScript for finding real roots of polynomial equations of degree up to 4 (quartic).

Usage

Functions take a value of type float and return a sorted array of real roots. If there are no roots, return an empty array.

Examples

func example():

var roots: Array[float] = Equation.quartic_solve_real(1, -10, 35, -50, 24)

print(roots) # Prints "[1, 2, 3, 4]"

roots = Equation.cubic_solve_real(2, -11, 12, 9)

print(roots) # Prints "[-0.5, 3]"

Functions in current version

linear_solve_real(a: float, b: float) -> Array[float]

quadratic_solve_real(a: float, b: float, c: float) -> Array[float]

cubic_solve_real(a: float, b: float, c: float, d: float) -> Array[float]

quartic_solve_real(a: float, b: float, c: float, d: float, e: float) -> Array[float]

Warning

Arguments that are too large or small can lead to inaccurate answers.

## Reviews

## Quick Information

Functions on GDScript for finding real roots of polynomial equations of degree up to 4 (quartic).UsageFunctions take a value of type float and return a sorted array of real roots. If there are no roots, return an empty array.Examplesfunc example():var roots: Array[float] = Equation.quartic_solve_real(1, -10, 35, -50, 24)print(roots) # Prints "[1, 2, 3, 4]"roots = Equation.cubic_solve_real(2, -11, 12, 9)print(roots) # Prints "[-0.5, 3]"Functions in current versionlinear_solve_real(a: float, b: float) -> Array[float]quadratic_solve_real(a: float, b: float, c: float) -> Array[float]cubic_solve_real(a: float, b: float, c: float, d: float) -> Array[float]quartic_solve_real(a: float, b: float, c: float, d: float, e: float) -> Array[float]WarningArguments that are too large or small can lead to inaccurate answers.