fix set heading

This commit is contained in:
Franz Dietrich 2025-10-18 22:18:36 +02:00
parent 28527e6113
commit 2199a7803f

View File

@ -368,7 +368,8 @@ impl TurtlePlan {
/// } /// }
/// ``` /// ```
pub fn set_heading(&mut self, heading: Precision) -> &mut Self { pub fn set_heading(&mut self, heading: Precision) -> &mut Self {
self.queue.push(TurtleCommand::SetHeading(heading)); self.queue
.push(TurtleCommand::SetHeading(-heading.to_radians()));
self self
} }
@ -665,7 +666,6 @@ impl TurtlePlan {
/// .write_text("End", 16u16); /// .write_text("End", 16u16);
/// } /// }
/// ``` /// ```
#[must_use]
pub fn write_text<T>(&mut self, text: impl Into<String>, font_size: T) -> &mut Self pub fn write_text<T>(&mut self, text: impl Into<String>, font_size: T) -> &mut Self
where where
T: Into<FontSize>, T: Into<FontSize>,