-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corrected some typos to make the code clean and added two macros #23
Conversation
amsorrytola
commented
Feb 16, 2024
•
edited
Loading
edited
- in complex.huff the add function should take 4 values but it was written take(0) similarly it should be written return(2). It doesnt affect the working of code .
- added an function in complex.huff that takes a complex number and angle by which it should rotate it and returns the rotated complex number.
- added another function that takes two complex numbers as input and returns the equation of a line that passes through it.
Hey @mohammed-talha-ansari |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't affect macro implementation due to the stack being the same but logically, macro definition should contain 4 instead of 0.
Then shouldn't it return 2 values as well? Also is this trend followed in all functions? |
Yes, like I said what happens in the macro definition doesn't affect the actual working of the function but for clean and quality code writing, it is indeed a typo and should be |
Okay. @mohammed-talha-ansari can you also make the above change as mentioned by Preeti in this PR? |
@@ -5,7 +5,7 @@ | |||
|
|||
#define constant VALUE_LOCATION = FREE_STORAGE_POINTER() | |||
|
|||
#define macro ADD_Z() = takes (0) returns (0) { | |||
#define macro ADD_Z() = takes (4) returns (0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueh4mster can you ensure that this change is correct and doesn't introduce any bugs?