Move orientation incantation into Vertex.rotate

Everywhere that Vertex#rotate was called, the orientation was rotated by 180 degrees first.
This commit is contained in:
SomeoneWithAnInternetConnection
2018-02-01 19:18:39 -05:00
committed by Adam
parent e396f37926
commit f2cc543dc7
3 changed files with 14 additions and 16 deletions

View File

@@ -48,6 +48,14 @@ public class Vertex
*/
public Vertex rotate(int orientation)
{
// models are orientated north (1024) and there are 2048 angles total
orientation = (orientation + 1024) % 2048;
if (orientation == 0)
{
return this;
}
int sin = Perspective.SINE[orientation];
int cos = Perspective.COSINE[orientation];