Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "proc.h"
- #include <QDebug>
- #include <math.h>
- Proc::Proc() : QObject()
- {
- }
- void Proc::SetVal(QString a)
- {
- var_1 = a.toInt();
- qDebug() << var_1;
- }
- void Proc::Run_1()
- {
- res_1 = ((var_1+2)/sqrt(2*var_1) - var_1/(sqrt(2*var_1)+2) + 2/(var_1 - sqrt(2*var_1))) * ((sqrt(var_1) - sqrt(2)) / (var_1+2));
- qDebug() << var_1;
- qDebug() << res_1;
- }
- void Proc::Run_2()
- {
- res_2 = 1 / (sqrt(var_1) + sqrt(2));
- qDebug() << var_1;
- qDebug() << res_2;
- }
- void Proc::Print_1()
- {
- emit ResOut_1(QString::number(res_1));
- }
- void Proc::Print_2()
- {
- emit ResOut_2(QString::number(res_2));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement