01 package renderer.modelers;
02
03 public class Vector {
04
05 public float x;
06 public float y;
07 public float z;
08
09 public Vector(float x, float y, float z)
10 {
11 this.x = x;
12 this.y = y;
13 this.z = z;
14 }
15
16 public String toString()
17 {
18 StringBuffer out = new StringBuffer();
19 out.append("x=");
20 out.append(x);
21 out.append("\n");
22 out.append("y=");
23 out.append(y);
24 out.append("\n");
25 out.append("z=");
26 out.append(z);
27 out.append("\n");
28 return out.toString();
29 }
30
31 public void display()
32 {
33 System.out.println(this);
34 }
35 }
|