Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions Turtle.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -8429,10 +8429,6 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
)
}</Value>
</NoteProperty>
<NoteProperty>
<Name>get_heading.js</Name>
<Value>heading: 0.0</Value>
</NoteProperty>
<NoteProperty>
<Name>go.js</Name>
<Value>function go() {
Expand All @@ -8447,6 +8443,17 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
<Name>goto.js</Name>
<Value>function goto(x,y) { return this.step(x - this.x, y - this.y) }</Value>
</NoteProperty>
<NoteProperty>
<Name>heading.js</Name>
<Value>function get_heading() {
const _ = this
if ( _['#heading'] === undefined ) {
_['#heading'] = 0.0
}
return _['#heading']
}
</Value>
</NoteProperty>
<NoteProperty>
<Name>height.js</Name>
<Value>height: 0.0</Value>
Expand Down Expand Up @@ -8520,7 +8527,7 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
</NoteProperty>
<NoteProperty>
<Name>pathData.js</Name>
<Value>function get_pathData() {
<Value>function pathData() {
let startX = 0;
let startY = 0;
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
Expand Down Expand Up @@ -8579,14 +8586,12 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
<NoteProperty>
<Name>set_heading.js</Name>
<Value>function set_heading(value) {
let _ = this
const _ = this
try {
_['#heading'] = new Number(value)
} catch {

_['#heading'] = 0.0
}

return _
}</Value>
</NoteProperty>
Expand All @@ -8610,7 +8615,7 @@ foreach ($javaScriptProperty in $this.psobject.properties | Sort-Object Name) {
<Value>function teleport(x,y) {
var penState = this.penDown
this.penDown = false
step(x - this.x, y - this.y)
this.step(x - this.x, y - this.y)
this.penDown = penState
return this
}</Value>
Expand Down
1 change: 0 additions & 1 deletion Types/Turtle.js/get_heading.js

This file was deleted.

7 changes: 7 additions & 0 deletions Types/Turtle.js/heading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function get_heading() {
const _ = this
if ( _['#heading'] === undefined ) {
_['#heading'] = 0.0
}
return _['#heading']
}
2 changes: 1 addition & 1 deletion Types/Turtle.js/pathData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function get_pathData() {
function pathData() {
let startX = 0;
let startY = 0;
if (!this.min) { this.min = { x: 0.0, y: 0.0}}
Expand Down
4 changes: 1 addition & 3 deletions Types/Turtle.js/set_heading.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
function set_heading(value) {
let _ = this
const _ = this
try {
_['#heading'] = new Number(value)
} catch {

_['#heading'] = 0.0
}

return _
}
2 changes: 1 addition & 1 deletion Types/Turtle.js/teleport.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function teleport(x,y) {
var penState = this.penDown
this.penDown = false
step(x - this.x, y - this.y)
this.step(x - this.x, y - this.y)
this.penDown = penState
return this
}
Loading