Skip to content

Commit 2b00cf9

Browse files
Cool-KattSleeplessBytegithub-actions[bot]
authored
[Docs]Update instructions.md (exercism#2508)
* Update instructions.md Co-authored-by: Derk-Jan Karrenbeld <[email protected]> * [CI] Format code --------- Co-authored-by: Derk-Jan Karrenbeld <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 57c712f commit 2b00cf9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

exercises/concept/coordinate-transformation/.docs/instructions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ so you decide to use a function closure to create reusable transformation for `{
88

99
Implement the `translate2d` function that returns a function making use of a closure to perform a repeatable 2d translation of a coordinate pair.
1010

11+
> In Geometry, [translation][wiki-translate] refers to moving points, vectors or shapes the same distance in one direction.
12+
> It can be interpreted as addition of a constant to every point.
13+
1114
```javascript
1215
const moveCoordinatesRight2Px = translate2d(2, 0);
1316
const result = moveCoordinatesRight2Px(4, 8);
@@ -18,6 +21,9 @@ const result = moveCoordinatesRight2Px(4, 8);
1821

1922
Implement the `scale2d` function that returns a function making use of a closure to perform a repeatable 2d scale of a coordinate pair.
2023

24+
> In geometry, uniform [scaling][wiki-scale] refers to enlarging or shrinking vectors or shapes in the same direction.
25+
> It can be interpreted as multiplying every point by a constant (scaling factor).
26+
>
2127
> For this exercise, assume only positive scaling values.
2228
2329
```javascript
@@ -56,3 +62,6 @@ const memoizedScale = memoizeTransform(tripleScale);
5662
memoizedScale(4, 3); // => [12, 9], this is computed since it hasn't been computed before for the arguments
5763
memoizedScale(4, 3); // => [12, 9], this is remembered, since it was computed already
5864
```
65+
66+
[wiki-translate]: https://en.wikipedia.org/wiki/Translation_(geometry)
67+
[wiki-scale]: https://en.wikipedia.org/wiki/Scaling_(geometry)

0 commit comments

Comments
 (0)