From 9539ec8c96689d1f07cd7f32cd86975e9b16d8fd Mon Sep 17 00:00:00 2001 From: Haim Kastner Date: Tue, 3 Dec 2024 18:56:39 +0200 Subject: [PATCH] Update docs --- .github/workflows/build.yml | 2 +- README.md | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c249873..838f3aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: unitsnet-py +name: unitsnet-go on: [push, workflow_dispatch] diff --git a/README.md b/README.md index 0311a6e..238cab8 100644 --- a/README.md +++ b/README.md @@ -39,29 +39,29 @@ import ( func main() { // Create a factory instance - af := unitsnet_go.AngleFactory{} - + af := unitsnet_go.AngleFactory{} + angle, _ := af.FromDegrees(180) // equals to - angle, _ := af.CreateAngle(180, unitsnet_go.AngleDegree) + angle, _ := af.CreateAngle(180, unitsnet_go.AngleDegree) log.Println(angle.Radians()) // 3.141592653589793 - log.Println(angle.Microradians()) // 3141592.65358979 - log.Println(angle.Gradians()) // 200 - log.Println(angle.Microdegrees()) // 180000000 + log.Println(angle.Microradians()) // 3141592.65358979 + log.Println(angle.Gradians()) // 200 + log.Println(angle.Microdegrees()) // 180000000 // As an alternative, a convert style method are also available - log.Println(angle.Convert(unitsnet_go.AngleRadian)) // 3.141592653589793 - log.Println(angle.Convert(unitsnet_go.AngleMicroradian)) // 3141592.65358979 - log.Println(angle.Convert(unitsnet_go.AngleGradian)) // 200 - log.Println(angle.Convert(unitsnet_go.AngleMicrodegree)) // 180000000 + log.Println(angle.Convert(unitsnet_go.AngleRadian)) // 3.141592653589793 + log.Println(angle.Convert(unitsnet_go.AngleMicroradian)) // 3141592.65358979 + log.Println(angle.Convert(unitsnet_go.AngleGradian)) // 200 + log.Println(angle.Convert(unitsnet_go.AngleMicrodegree)) // 180000000 // Print the default unit to_string (The default for angle is degrees) - log.Println(angle) // 180.00 ° + log.Println(angle) // 180.00 ° // Specify unit and fraction digits max length log.Println(angle.ToString(unitsnet_go.AngleDegree, 0)) // 180 ° - log.Println(angle.ToString(unitsnet_go.AngleRadian, 3)) // 3.141 rad + log.Println(angle.ToString(unitsnet_go.AngleRadian, 3)) // 3.141 rad } ```