Yvaine
Yvaine
> > 因为 mantissa 固定长度是 52 位,再加上省略的一位,最多可以表示的数是 2^53=9007199254740992,对应科学计数尾数是 9.007199254740992,这也是 JS 最多能表示的精度。它的长度是 16,所以可以使用 toPrecision(16) 来做精度运算,超过的精度会自动做凑整处理。 > > “为什么 x=0.1 能得到 0.1?”这一块有一些不明白的地方,能否指点一下? > 0.1 是 JavaScript 中的 Number 类型,用的是 IEEE 754 双精度格式,那么为什么不是直接在二进制下讨论它的精度,而是转换为十进制之后再讨论它的精度呢?而且“JS...
I met the same problem. And while webpack4+babel7 babel.config.js ``` module.exports = { presets: [["@vue/app", { modules: "commonjs" }]], plugins: ["add-module-exports"] }; ``` module.js ``` const a = 1 const...
@ljharb then what has `babel-plugin-add-module-exports` done? Something happens when I publish a module on npm and then import it from `node_modules`.
@ljharb well, I just forget to **rebuild my module**. Acturally, `babel-plugin-add-module-exports` works well and it removes `.default` that what exactly I want. Now ``` import { a } from "module"...
```js // store.js export const todoListTypeState = atom({ key: "todoListTypeState", default: "snack", }); export const todoListState = atom({ key: "todoListState", default: [ { type: "snack", content: "cake" }, { type:...
I really need this.
In fact, `NoPanClassName` is added to node by default so panning does not allowed on nodes. ```js // src/components/Nodes/wrapNode.tsx const nodeClasses = cc([ 'react-flow__node', `react-flow__node-${type}`, noPanClassName, // here className, {...