mirror of https://github.com/rkfg/regolancer
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
171 B
Go
11 lines
171 B
Go
2 years ago
|
package main
|
||
|
|
||
|
func absoluteDeltaPPM(base, amt int64) (deltaPPM int64) {
|
||
|
|
||
|
deltaPPM = (base - amt) * 1e6 / base
|
||
|
if deltaPPM < 0 {
|
||
|
return -deltaPPM
|
||
|
}
|
||
|
return deltaPPM
|
||
|
}
|