Calculates the absolute distance between given values.

Type signature

(a: number, b: number) => number

Examples

delta(-3, 5);
// ⇒ 8
Try in REPL

Questions

  • How to calculate an absolute distance between two numbers?

TypeScript sourceJavaScript source