Skip to content

newchen/tf-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

解决 JS 浮点运算问题, 不支持大精度计算

使用方式

import * as Calc from "tf-calc";

// 加
Calc.add(0.1, 0.2);
Calc.add(2.1, 2.2);

// 减
Calc.sub(0.24, 0.1);
Calc.sub(2.2, 1.9);

// 乘
Calc.mul(7, 0.8);
Calc.mul(2.2, 2.2);

// 除
Calc.div(2.1, 0.3);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published