Clip in view voulme

Hi,
I’m trying to implement OpenGL GPU Pipeline and got some trobels in clipping the view volume with clip cordinates:
I have line from V1(x1,y1,z1,w1) & V2(x2,y2,z2,w2) :
|
V1 (x1,w1) o | o V2 (x2,w2)
|
W=Xmax
and x1>w1 & x2<w2 so I need to clip the line on x axis.
I need to find t=(x1-Xmax)/(x1-x2).
but what is W (Xmax)? How can I find him?

I hope the image is now clear…
|
V1 (x1,w1) o | o V2 (x2,w2)
|
W=Xmax

Ignore ----:

-------------|
V1 (x1,w1) o | o V2 (x2,w2)
-------------|
W=Xmax