Skip to content

Tag: rotation

Memory game cards not flipping properly

The backside of my cards in my memory game are not flipping properly. At the moment when I hover over the front of any card, half of image on the back of the card appears first before the other half, as if the image was folded in half. Also the doesn’t look like it is flipping. What do I need

How to calculate rotation in 2D in Javascript

I am not so familiar trigonometry, but I have only two points to rotate in 2D: cx, cy = rotation center x,y = current x,y nx, ny = new coordinates How to calculate new points in a certain angle? Answer The first two parameters are the X and Y coordinates of the central point (the origin around which the secon…