mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[python/turtle] Clean Turtle::PawPosition
This commit is contained in:
@@ -330,7 +330,7 @@ void Turtle::drawPaw(PawType type, PawPosition pos) {
|
||||
|
||||
// Compute the paw offset from the turtle center
|
||||
float currentAngle = angles[(int) type];
|
||||
float crawlDelta = (((int)pos) - 2.0f) * crawlOffset;
|
||||
float crawlDelta = ((float)((int)pos)) * crawlOffset;
|
||||
float pawX = pawOffset * sin(m_heading+currentAngle) + crawlDelta * sin(m_heading);
|
||||
float pawY = - pawOffset * cos(m_heading+currentAngle) - crawlDelta * cos(m_heading);
|
||||
KDCoordinate pawOffsetX = ((int)pawX) - (pawX < 0 ? 1 : 0);
|
||||
|
||||
@@ -91,12 +91,12 @@ private:
|
||||
BackLeft = 3
|
||||
};
|
||||
|
||||
enum class PawPosition : int {
|
||||
Backwards = 0,
|
||||
HalfBackwards = 1,
|
||||
Normal = 2,
|
||||
HalfForward = 3,
|
||||
Forward = 4
|
||||
enum class PawPosition : int8_t {
|
||||
Backwards = -1,
|
||||
HalfBackwards = -2,
|
||||
Normal = 0,
|
||||
HalfForward = 1,
|
||||
Forward = 2
|
||||
};
|
||||
|
||||
class NameColorPair {
|
||||
|
||||
Reference in New Issue
Block a user