cmdLen returns the number of values (float64s) the path command contains.
(cmd float64)
| 77 | |
| 78 | // cmdLen returns the number of values (float64s) the path command contains. |
| 79 | func cmdLen(cmd float64) int { |
| 80 | // extract only part of the exponent, this is 3 times faster than using a switch on cmd |
| 81 | n := uint8((math.Float64bits(cmd)&0x0FF0000000000000)>>52) + 1 |
| 82 | return cmdLens[n] |
| 83 | } |
| 84 | |
| 85 | // toArcFlags converts to the largeArc and sweep boolean flags given its value in the path. |
| 86 | func toArcFlags(f float64) (bool, bool) { |
no outgoing calls