Created
June 9, 2024 19:40
-
-
Save mcsee/6eea7c69dd11e4337e1819e4a3682475 to your computer and use it in GitHub Desktop.
Gemini Black Hole
This file contains 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
public class BlackHole | |
{ | |
public double Mass { get; private set; } | |
public double SchwarzschildRadius { get; private set; } | |
public bool HasSingularity { get; } // Always true for a black hole | |
public BlackHole(double mass) | |
{ | |
Mass = mass; | |
SchwarzschildRadius = CalculateSchwarzschildRadius(mass); | |
HasSingularity = true; | |
} | |
private double CalculateSchwarzschildRadius(double mass) | |
{ | |
const double G = 6.6743e-11; // Gravitational constant | |
return 2 * G * mass / Constants.SpeedOfLight; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment