feat: implement function unequal
This commit is contained in:
parent
fbec410c42
commit
9aec1bca17
@ -1,11 +1,12 @@
|
|||||||
import { configDependency } from '../core/Config.js'
|
import { configDependency } from '../core/Config.js'
|
||||||
import {Signature, ImpType} from '../core/Dispatcher.js'
|
import { Signature, ImpType, Dependency } from '../core/Dispatcher.js'
|
||||||
|
|
||||||
const DBL_EPSILON = Number.EPSILON || 2.2204460492503130808472633361816E-16
|
const DBL_EPSILON = Number.EPSILON || 2.2204460492503130808472633361816E-16
|
||||||
|
|
||||||
declare module "./type" {
|
declare module "./type" {
|
||||||
interface NumbersReturn<Params> {
|
interface NumbersReturn<Params> {
|
||||||
equal: Signature<Params, [number, number], boolean>
|
equal: Signature<Params, [number, number], boolean>
|
||||||
|
unequal: Signature<Params, [number, number], boolean>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,3 +26,9 @@ export const equal =
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const unequal = (dep: Dependency<'equal', [number, number]>):
|
||||||
|
ImpType<'unequal', [number, number]> =>
|
||||||
|
(x, y) => {
|
||||||
|
return !dep.equal(x, y)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user