Skip to content

Instantly share code, notes, and snippets.

@smallgeek
Created December 8, 2012 09:57
Show Gist options
  • Select an option

  • Save smallgeek/4239651 to your computer and use it in GitHub Desktop.

Select an option

Save smallgeek/4239651 to your computer and use it in GitHub Desktop.
Turtle
namespace TurtleGraphics.Library
type Turtle = { x: int; y: int; step:float ; angle: float }
with member this.turn a =
{ this with angle = (this.angle + a) - float (int this.angle) + float (int this.angle % 360) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment