Repository navigation
compute diff
kgryte edited this page May 12, 2015
·
1 revision
Calculates the differences between adjacent elements in an array.
var arr = [ 2, 1, 3, 4 ];
var diff = compute.diff( arr );
// returns [ 1, -2, -1 ]Note: the length of the returned array is one less than the length of the original array.
- Utilities
- Array Creation
- Sorting and Reshaping Arrays
- Special Functions
- Arithmetic
- Relational Operations
- Logical Operations
- Trigonometry
- Geometry
- Sets
- Discrete Mathematics
- Linear Algebra
- Statistics