Skip to content

Commit

Permalink
feat(core): add Vector2 type for 2D vector representation
Browse files Browse the repository at this point in the history
Introduced the Vector2 type in the swiperia-core package to define 2D vectors as tuples. This will facilitate handling coordinates and movements more effectively in the swipe detection logic.
  • Loading branch information
samavati committed Apr 13, 2024
1 parent 236e337 commit 7f55615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/swiperia-core/src/lib/vector2/Vector2.type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Represents a 2D vector, defined as a tuple of two numbers.
*/
export type Vector2 = [number, number];
1 change: 1 addition & 0 deletions packages/swiperia-core/src/lib/vector2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { Vector2 } from './Vector2.type';

0 comments on commit 7f55615

Please sign in to comment.