func ExampleLen4Half() { // Example 3.f, p. 32. half, err := interp.Len4Half([]float64{ base.NewRA(10, 18, 48.732).Rad(), base.NewRA(10, 23, 22.835).Rad(), base.NewRA(10, 27, 57.247).Rad(), base.NewRA(10, 32, 31.983).Rad(), }) if err != nil { fmt.Println(err) return } fmt.Printf("%.3d", base.NewFmtRA(half)) // Output: // 10ʰ25ᵐ40ˢ.001 }
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 }