You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@galbacarys This probably refers to the string representation of the turtle. After each movement command the Turtle record is returned, thus printed in the REPL. There are some functions that determine the format of this string
Yes, @jeisses is right. Keep in mind that there's a difference between println/print (printing meant for humans to read) and prn/pr (printing in such a way that the REPL's reader can read them). The REPL uses prn to print return vals.
A custom prn has already been implemented / extended for Turtle values for CLJ and for CLJS. So for the purposes here, we just need to work within the pr-str-turtle fn to customize how the values for :x, :y, and :angle get turned into a string. The math libs in Java vs. JS are probably different, so we'll need reader conditionals.
On second thought, I think just one digit after the decimal point is enough.
When printing the turtle position in the REPL, we get full precision of the floating point. We only need 2 decimal places at most.
The text was updated successfully, but these errors were encountered: