This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stack> | |
using namespace std; | |
double Evaluate(string input); | |
int GetTokenPrecedence(char c); | |
double ApplyOperator(double a, double b, char op); | |
int main(int argc, char* argv[]) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
void Interpret(string input, vector<uint8_t> &memory); | |
int main() | |
{ | |
vector<uint8_t> memory{ 0 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const RAD_2_DEG = 57.29577951308232; | |
/** | |
* Returns a number between min and max. | |
* | |
* @ignore | |
* @param {number} n Number to clamp. | |
* @param {number} min Upper limit. | |
* @param {number} max Lower limit. | |
* @return {number} Number between min and max. |