#Coordinate Transformation

45 messages ยท Page 1 of 1 (latest)

alpine crown
shadow hamlet
#

wait

#

export function translate2d(dx, dy) {
function move() {
return [dx + dx, dy + dy];
}
return move;
}

dim burrowBOT
alpine crown
#

I think move is supposed to accept arguments maybe?

shadow hamlet
#

I'll try

#

wait

#

but what args?

alpine crown
#

That's a lot of waiting you're having us do ๐Ÿ™‚

#

The example shows,

const moveCoordinatesRight2Px = translate2d(2, 0);
const result = moveCoordinatesRight2Px(4, 8);
// result => [6, 8]
shadow hamlet
alpine crown
#

You told me to "wait" twice

#

Node how the translate2d() takes two values and returns a function. That function also takes two values.

shadow hamlet
alpine crown
#

The result is the addition of those two sets.

shadow hamlet
#

makes sense

alpine crown
#
const move = translate2d(2, 0);
const result = move(4, 8);
#

That's four unique values (variables?)

shadow hamlet
#

done with the first taks

#

task*

alpine crown
#

๐ŸŽ‰

shadow hamlet
#

Thank you!

#

for your time and effort.

alpine crown
#

You're very welcome

#

In the future, you may want to consider not telling people on the internet to wait ๐Ÿ˜‰

dim burrowBOT
#

If everything is resolved, we ask that the person who posted the request react to the top/original post with a :white_check_mark: (:white_check_mark:). This indicates to others that this issue has been resolved and locks the thread.
If all the tests pass and you want to further improve your solution, we encourage you to use the "Request a Code Review" feature on the website!

shadow hamlet
#

Any other requests good sire?

alpine crown
#

Nope. That's all.

shadow hamlet
#

splendid.

#

Are you still there?

#

Stuck again on task 3

#

I'm not sure If I'm allowed to tag you.

alpine crown
#

Ideally I'm not the only one who can help ๐Ÿ˜‰ And I have other stuff going on from time to time.

#

Could you share what you tried? What's the error? Please don't use images to share text.

shadow hamlet
#

I'm sorry.

#

ok.

#

I haven't tried anything

#

I can

#

I can't understand the question.

#

This specific exercise is pretty hard compared to others.

alpine crown
#

This task asks you to do something similar to the prior tasks but instead of using addition or multiplication to change the coordinates, you need to call a function.

#

Replace x, y = x1 + x2 y1 + y2 with x, y = some_function(x2, y2) or similar. Twice.