func Example_rA() { // Example 1.a, p. 8 h := unit.FromSexa(' ', 9, 14, 55.8) fmt.Printf("%.9f\n", h) α := unit.RAFromHour(h) fmt.Printf("%.5f\n", α.Deg()) fmt.Printf("%.6f\n", α.Tan()) // Output: // 9.248833333 // 138.73250 // -0.877517 }
func ExampleLen4Half() { // Example 3.f, p. 32. half, err := interp.Len4Half([]float64{ unit.FromSexa(0, 10, 18, 48.732), unit.FromSexa(0, 10, 23, 22.835), unit.FromSexa(0, 10, 27, 57.247), unit.FromSexa(0, 10, 32, 31.983), }) if err != nil { fmt.Println(err) return } fmt.Printf("%.3d", sexa.FmtRA(unit.RAFromHour(half))) // Output: // 10ʰ25ᵐ40ˢ.001 }