Update Item Specifications
parent
3fe2314049
commit
aea37b8cca
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ export const sqrt = [[Number], math => {
|
|||
}]
|
||||
```
|
||||
|
||||
Note here that ideally the accesses to `math.config.predictable` and `math.types.Complex` in this factory mean that the resulting implementation of `sqrt` will depend on the `predictable` property of `math.config`, and so only be invalidated with that property changes, not on any change to `math.config`, just the way that the other possible implementation would only be invalidated if the implementation of `complex` on `Number, Number` were updated, but unaffected if the implementation of `complex` on `bigint, bigint` changed.
|
||||
Note here that ideally the accesses to `math.config.predictable` and `math.types.Complex` in this factory mean that the resulting implementation of `sqrt` will depend on the `predictable` property of `math.config`, and so only be invalidated when that property changes, not on any change to `math.config`, just the way that the other possible implementation would only be invalidated if the implementation of `complex` on `Number, Number` were updated, but unaffected if the implementation of `complex` on `bigint, bigint` changed.
|
||||
|
||||
Looking at how other config properties might work, let's suppose that the `constants` property gives the numeric type that should be used for named constants (e.g., Number or BigNumber). We want `math.tau` to give a scalar entity, but we'd also like to record different possible entities for different types. Since we can't put properties on a number, we use a resolve function directly on the math object that takes the identifier to resolve:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue