onSolarDisk function
Whether direction (from the Earth's centre) falls on the disk of the
Sun seen in direction sunFromEarth.
Implementation
bool onSolarDisk(Vector3 direction, Vector3 sunFromEarth) {
final cosSeparation = direction.unit.dot(sunFromEarth.unit);
final sinRadius = solarRadius / sunFromEarth.length;
return cosSeparation > math.sqrt(1 - sinRadius * sinRadius);
}