Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
1edc95d9
Commit
1edc95d9
authored
Aug 02, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级新版本
parent
ce574db1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
CalcHelper.java
...src/main/java/com/yanzuoguang/util/helper/CalcHelper.java
+9
-9
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/CalcHelper.java
View file @
1edc95d9
...
...
@@ -32,7 +32,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
add
(
Double
d1
,
Double
d2
)
{
public
static
double
add
Double
(
Double
d1
,
Double
d2
)
{
return
add
(
StringHelper
.
toDouble
(
d1
),
StringHelper
.
toDouble
(
d2
));
}
...
...
@@ -58,7 +58,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
addList
(
Double
d1
,
Double
...
d2
)
{
public
static
double
addList
Double
(
Double
d1
,
Double
...
d2
)
{
double
ret
=
d1
;
for
(
double
item
:
d2
)
{
ret
=
add
(
ret
,
item
);
...
...
@@ -86,7 +86,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
sub
(
Double
d1
,
Double
d2
)
{
public
static
double
sub
Double
(
Double
d1
,
Double
d2
)
{
return
sub
(
StringHelper
.
toDouble
(
d1
),
StringHelper
.
toDouble
(
d2
));
}
...
...
@@ -112,7 +112,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
subList
(
Double
d1
,
Double
...
d2
)
{
public
static
double
subList
Double
(
Double
d1
,
Double
...
d2
)
{
double
ret
=
d1
;
for
(
double
item
:
d2
)
{
ret
=
sub
(
ret
,
item
);
...
...
@@ -140,7 +140,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
mul
(
Double
d1
,
Double
d2
)
{
public
static
double
mul
Double
(
Double
d1
,
Double
d2
)
{
return
mul
(
StringHelper
.
toDouble
(
d1
),
StringHelper
.
toDouble
(
d2
));
}
...
...
@@ -166,7 +166,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
mulList
(
Double
d1
,
Double
...
d2
)
{
public
static
double
mulList
Double
(
Double
d1
,
Double
...
d2
)
{
double
ret
=
d1
;
for
(
double
item
:
d2
)
{
ret
=
mul
(
ret
,
item
);
...
...
@@ -192,7 +192,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
div
(
Double
d1
,
Double
d2
)
{
public
static
double
div
Double
(
Double
d1
,
Double
d2
)
{
return
div
(
StringHelper
.
toDouble
(
d1
),
StringHelper
.
toDouble
(
d2
));
}
...
...
@@ -221,7 +221,7 @@ public class CalcHelper {
* @param scale 保留小数
* @return 结果
*/
public
static
double
div
(
Double
d1
,
Double
d2
,
int
scale
)
{
public
static
double
div
Double
(
Double
d1
,
Double
d2
,
int
scale
)
{
return
div
(
StringHelper
.
toDouble
(
d1
),
StringHelper
.
toDouble
(
d2
),
scale
);
}
...
...
@@ -247,7 +247,7 @@ public class CalcHelper {
* @param d2 参数2
* @return 结果
*/
public
static
double
divList
(
Double
d1
,
Double
...
d2
)
{
public
static
double
divList
Double
(
Double
d1
,
Double
...
d2
)
{
double
ret
=
d1
;
for
(
double
item
:
d2
)
{
ret
=
div
(
ret
,
item
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment