Created
April 17, 2021 15:42
-
-
Save pertsevds/745ba6e46dd321b68a26fe4a07406b8c to your computer and use it in GitHub Desktop.
Calculate the angle of the ball bouncing from the wall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Billiards | |
{ | |
public static class BilliardsTask | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="directionRadians">Угол направления движения шара</param> | |
/// <param name="wallInclinationRadians">Угол</param> | |
/// <returns></returns> | |
public static double BounceWall(double directionRadians, double wallInclinationRadians) | |
{ | |
return (2 * wallInclinationRadians) - directionRadians; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment