(coord, dim int)
| 163 | } |
| 164 | |
| 165 | func clampDesktopCoordinate(coord, dim int) int { |
| 166 | if dim <= 0 { |
| 167 | return 0 |
| 168 | } |
| 169 | if coord < 0 { |
| 170 | return 0 |
| 171 | } |
| 172 | if coord >= dim { |
| 173 | return dim - 1 |
| 174 | } |
| 175 | return coord |
| 176 | } |
| 177 | |
| 178 | func sanitizeDesktopDimension(dim int) int { |
| 179 | if dim <= 0 { |
no outgoing calls
no test coverage detected