* @implement * - The input is allowed to be `[NaN/null/undefined, xxx]`/`[xxx, NaN/null/undefined]`; * the return is `[NaN, xxxresult]`/`[xxxresult, NaN]` or clamped boundary value if * `clamp` passed. This is for the usage that only get coord on single x or y. * - Alwasy retur
(
data: MatrixCoordRangeOption[],
opt?: Parameters<Matrix['dataToLayout']>[1],
out?: number[]
)
| 150 | * If it can not be located or invalid, return `[NaN, NaN]`. |
| 151 | */ |
| 152 | dataToPoint( |
| 153 | data: MatrixCoordRangeOption[], |
| 154 | opt?: Parameters<Matrix['dataToLayout']>[1], |
| 155 | out?: number[] |
| 156 | ): number[] { |
| 157 | out = out || []; |
| 158 | |
| 159 | this.dataToLayout(data, opt, _dtpOutDataToLayout); |
| 160 | |
| 161 | out[0] = _dtpOutDataToLayout.rect.x + _dtpOutDataToLayout.rect.width / 2; |
| 162 | out[1] = _dtpOutDataToLayout.rect.y + _dtpOutDataToLayout.rect.height / 2; |
| 163 | return out; |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * @implement |
nothing calls this directly
no test coverage detected