package geagle import ( "strconv" "strings" ) type Rotation string func (r Rotation) Angle() int { s := strings.TrimPrefix(string(r), "R") v, _ := strconv.Atoi(s) return v } func FromAngle(degrees int) Rotation { return Rotation("R" + strconv.Itoa(degrees)) }