Incorrect comparison? If statement not returning proper results.

9593793706205999104 < 18446744073709551615
Now, call me crazy, but this statement is true right?

But these two numbers are dist2 and range, the variables being compared below, and it keeps resulting false. Am I doing something wrong here?

(P.S) isMapped is not the problem, I’ve already ran the debug and it definitely is the inequality.

List<Point> pointsWithinRange(Point point, ulong range)
    {
        List<Point> points = new List<Point>();
        List<Orbital> sector = new List<Orbital>();
        if (point.parent == null)
        {
            for (int i = 0; i < galaxy.solarSystems.Count; i++)
                sector.Add(galaxy.solarSystems*);*

}
else
{
for (int i = 0; i < point.parent.children.Count; i++)
sector.Add(point.parent.children*);*
}
for (int i = 0; i < sector.Count; i++)
{
ulong dist2 = Distance2((ulong)point.pos.x, (ulong)point.pos.y, (ulong)sector_.position.x, (ulong)sector*.position.y);_
_if (dist2 < (rangerange) && !isMapped(sector*, centerPoint))
{_

_points.Add(new Point(sector));
Debug.Log(“Point Found within Range”);
}
else
{
Debug.Log("Point found outside range. Dist is: “+dist2+” while range is: "+range);
}
}*

if (points.Count <= 0)
return null;_

return points;
}

ulong Distance2(ulong x1, ulong y1, ulong x2, ulong y2)
{
return ((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1));
}

No way, that makes sense. But I was squaring range (which range is ulong.max for testing), because I’m not sure how to sqrt dist, since Mathf returns floats. Any suggestions there?