MCPcopy Create free account
hub / github.com/AlloyTeam/PhyTouch / _rounded

Method _rounded

transformjs/react/transform.react.js:83–87  ·  view source on GitHub ↗
(value, i)

Source from the content-addressed store, hash-verified

81
82 // 解决角度为90的整数倍导致Math.cos得到极小的数,其实是0。导致不渲染
83 _rounded(value, i) {
84 i = Math.pow(10, i || 15);
85 // default
86 return Math.round(value * i) / i;
87 }
88
89 _arrayWrap(arr) {
90 return window.Float32Array ? new Float32Array(arr) : arr;

Callers 4

appendTransformMethod · 0.95
transform.jsFile · 0.80
index.jsFile · 0.80
transform.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected