New course! Every coder should learn Generative AI!
Try a free lesson+ 7
a graphical illustration of taran's method
https://code.sololearn.com/WOSkh92TwAYI/?ref=app
+ 8
collision of 2 rectangles:
function collisionRectanglePoint(rectangle, x, y){
return (x > rectangle.getMiddleX() - rectangle.getWidth()/2 && x < rectangle.getMiddleX() + rectangle.getWidth()/2 && y > rectangle.getMiddleY() - rectangle.getHeight()/2 && y < rectangle.getMiddleY() + rectangle.getHeight()/2);
}
function collisionRectangleRectangle(rect1, rect2){
return (
collisionRectanglePoint(rect1, rect2.getMiddleX() - rect2.getWidth()/2, rect2.getMiddleY() - rect2.getHeight()/2) ||
collisionRectanglePoint(rect1, rect2.getMiddleX() - rect2.getWidth()/2, rect2.getMiddleY() + rect2.getHeight()/2) ||
collisionRectanglePoint(rect1, rect2.getMiddleX() + rect2.getWidth()/2, rect2.getMiddleY() - rect2.getHeight()/2) ||
collisionRectanglePoint(rect1, rect2.getMiddleX() + rect2.getWidth()/2, rect2.getMiddleY() + rect2.getHeight()/2) ||
collisionRectanglePoint(rect2, rect1.getMiddleX(), rect2.getMiddleY())
);
}
+ 4
collision of circles, rectangles or what?
+ 4
wait a sec... 😅
+ 4
We can make responsive website
With help of html+Css+Js
Html is a easy to learn formatting tags
We add Css in html with <style> tag and style attribute
We add java script in html <script>tag
+ 3
How do i strat html
- 5
Hiii