Skip to content

Commit

Permalink
Move many math operations to SharedOperations.cs
Browse files Browse the repository at this point in the history
As well as error improvements
  • Loading branch information
wixoaGit committed Oct 4, 2023
1 parent 4017375 commit d0cef08
Show file tree
Hide file tree
Showing 11 changed files with 281 additions and 221 deletions.
8 changes: 4 additions & 4 deletions DMCompiler/Bytecode/DreamProcOpcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ public enum DreamProcOpcode : byte {
Sin = 0x79,
Cos = 0x7A,
Tan = 0x7B,
Arcsin = 0x7C,
Arccos = 0x7D,
Arctan = 0x7E,
Arctan2 = 0x7F,
ArcSin = 0x7C,
ArcCos = 0x7D,
ArcTan = 0x7E,
ArcTan2 = 0x7F,
Sqrt = 0x80,
Log = 0x81,
LogE = 0x82,
Expand Down
16 changes: 8 additions & 8 deletions DMCompiler/DM/DMProc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -957,21 +957,21 @@ public void Tan() {
WriteOpcode(DreamProcOpcode.Tan);
}

public void Arcsin() {
WriteOpcode(DreamProcOpcode.Arcsin);
public void ArcSin() {
WriteOpcode(DreamProcOpcode.ArcSin);
}

public void Arccos() {
WriteOpcode(DreamProcOpcode.Arccos);
public void ArcCos() {
WriteOpcode(DreamProcOpcode.ArcCos);
}

public void Arctan() {
WriteOpcode(DreamProcOpcode.Arctan);
public void ArcTan() {
WriteOpcode(DreamProcOpcode.ArcTan);
}

public void Arctan2() {
public void ArcTan2() {
ShrinkStack(1);
WriteOpcode(DreamProcOpcode.Arctan2);
WriteOpcode(DreamProcOpcode.ArcTan2);
}

public void Sqrt() {
Expand Down
Loading

0 comments on commit d0cef08

Please sign in to comment.