How to make a Parametric cube?

No.10969775 ViewReplyOriginalReport
f.e. if I want to draw a circle my equasion is sqrt(x^2+y^2) = r, where r is the radius. If I want to test if a point "p" is inside the circle, positioned at "c" I would just test if ||p-c|| < r

How do I do that with a cube? I know how to check if a point is inside a cube, but can I express the cube as a parametric equasion like "a circle with edges" so that I can just check if some "a" is smaller than "b" instead to check if a point is inside the cube instead of making a lot of if-elses?