package main import ( "math" ) type X1 struct{} func (x *X1) Func(f float64) uint16 { v := (65535 / 2) * (float64(screenHeight+screenWidth) / 2) / f return ToUint16(v) } type X2 struct{} func (x *X2) Func(f float64) uint16 { v := (math.Sin((float64(screenWidth)*float64(screenHeight))/f) + 1) / 2 * 65535 return ToUint16(v) }