(call, left)
| 502 | } |
| 503 | |
| 504 | function normalize(call, left) { |
| 505 | if (typeof left === "number") { |
| 506 | return 1.0; |
| 507 | } else if (left instanceof Cartesian2) { |
| 508 | return Cartesian2.normalize(left, scratchStorage.getCartesian2()); |
| 509 | } else if (left instanceof Cartesian3) { |
| 510 | return Cartesian3.normalize(left, scratchStorage.getCartesian3()); |
| 511 | } else if (left instanceof Cartesian4) { |
| 512 | return Cartesian4.normalize(left, scratchStorage.getCartesian4()); |
| 513 | } |
| 514 | |
| 515 | throw new RuntimeError( |
| 516 | `Function "${call}" requires a vector or number argument. Argument is ${left}.`, |
| 517 | ); |
| 518 | } |
| 519 | |
| 520 | function distance(call, left, right) { |
| 521 | if (typeof left === "number" && typeof right === "number") { |
nothing calls this directly
no test coverage detected
searching dependent graphs…