Invert a coord map by de-scaling and un-shifting; this gives the backward mapping for the gradient.
(coord_map)
| 104 | |
| 105 | |
| 106 | def inverse(coord_map): |
| 107 | """ |
| 108 | Invert a coord map by de-scaling and un-shifting; |
| 109 | this gives the backward mapping for the gradient. |
| 110 | """ |
| 111 | ax, a, b = coord_map |
| 112 | return ax, 1 / a, -b / a |
| 113 | |
| 114 | |
| 115 | def coord_map_from_to(top_from, top_to): |