Get returns whether i and j are colliding.
(i, j int)
| 43 | |
| 44 | // Get returns whether i and j are colliding. |
| 45 | func (m *Matrix) Get(i, j int) bool { |
| 46 | |
| 47 | var s, l int |
| 48 | if i < j { |
| 49 | s = i |
| 50 | l = j |
| 51 | } else { |
| 52 | s = j |
| 53 | l = i |
| 54 | } |
| 55 | return (*m)[s][l-s] |
| 56 | } |
| 57 | |
| 58 | // Reset clears all values. |
| 59 | func (m *Matrix) Reset() { |
no outgoing calls