## ini.trakem2.utils Class Vector3

```java.lang.Object ini.trakem2.utils.Vector3
```

`public class Vector3extends java.lang.Object`

Field Summary
` double` `x`

` double` `y`

` double` `z`

Constructor Summary
`Vector3()`
creates null vector
```Vector3(double x, double y, double z)```
creates vector from x,y,z
`Vector3(Vector3 v)`
creates vector from v

Method Summary
` Vector3` ```add(Vector3 v, Vector3 r)```

` double` `length()`

` Vector3` `normalize(Vector3 r)`

`static Vector3` ```rotate_v_around_axis(Vector3 v, Vector3 axis, double sin, double cos)```
From my former program, A_3D_Editing.java and Pipe.java
` Vector3` ```scale(double s, Vector3 r)```

` Vector3` ```set(double x, double y, double z)```

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### x

`public double x`

### y

`public double y`

### z

`public double z`
Constructor Detail

### Vector3

```public Vector3(double x,
double y,
double z)```
creates vector from x,y,z

### Vector3

`public Vector3()`
creates null vector

### Vector3

`public Vector3(Vector3 v)`
creates vector from v

Method Detail

### length

`public double length()`
Returns:
length

### normalize

`public Vector3 normalize(Vector3 r)`
Returns:
normal vector , or null if length is 0

### scale

```public Vector3 scale(double s,
Vector3 r)```
Returns:
vector scaled by s

```public Vector3 add(Vector3 v,
Vector3 r)```
Returns:
sum of vector and v

### set

```public Vector3 set(double x,
double y,
double z)```
Returns:
the vector set to x,y,z

### rotate_v_around_axis

```public static final Vector3 rotate_v_around_axis(Vector3 v,
Vector3 axis,
double sin,
double cos)```
From my former program, A_3D_Editing.java and Pipe.java