feat(maths::solver): prep solver
This commit is contained in:
parent
f9833263ef
commit
c0de467076
|
@ -8,7 +8,7 @@ pub mod parser;
|
||||||
pub mod maths;
|
pub mod maths;
|
||||||
|
|
||||||
|
|
||||||
pub fn pretty(v: Vec<GaussianRational>) {
|
pub fn pretty(v: &Vec<GaussianRational>) {
|
||||||
v[0].print();
|
v[0].print();
|
||||||
for i in 1..v.len() {
|
for i in 1..v.len() {
|
||||||
print!(" + ");
|
print!(" + ");
|
||||||
|
|
|
@ -10,7 +10,7 @@ fn main() {
|
||||||
println!("{:?}", equation);
|
println!("{:?}", equation);
|
||||||
let is_equation = computorv1::maths::evaluator::is_equation(&equation);
|
let is_equation = computorv1::maths::evaluator::is_equation(&equation);
|
||||||
let evaluated = computorv1::maths::evaluator::evaluate(equation);
|
let evaluated = computorv1::maths::evaluator::evaluate(equation);
|
||||||
computorv1::pretty(evaluated);
|
computorv1::pretty(&evaluated);
|
||||||
if is_equation {
|
if is_equation {
|
||||||
computorv1::maths::solver::solve(evaluated);
|
computorv1::maths::solver::solve(evaluated);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue