Package org.sunflow.math

# Class Vector3

java.lang.Object
org.sunflow.math.Vector3

public final class Vector3 extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`float`
`x`
`float`
`y`
`float`
`z`

## Constructor Summary

Constructors
Constructor
Description
`Vector3()`
`Vector3(float x, float y, float z)`
`Vector3(Vector3 v)`

## Method Summary

Modifier and Type
Method
Description
`static final Vector3`
`add(Vector3 v1, Vector3 v2, Vector3 dest)`
`static final Vector3`
`cross(Vector3 v1, Vector3 v2, Vector3 dest)`
`static final Vector3`
`decode(short n)`
`static final Vector3`
`decode(short n, Vector3 dest)`
`final Vector3`
`div(float d)`
`final Vector3`
`div(float d, Vector3 dest)`
`final float`
`dot(float vx, float vy, float vz)`
`static final float`
`dot(Vector3 v1, Vector3 v2)`
`final short`
`encode()`
`float`
`get(int i)`
`final float`
`length()`
`final float`
`lengthSquared()`
`final Vector3`
`mul(float s)`
`final Vector3`
`mul(float s, Vector3 dest)`
`final Vector3`
`negate()`
`final Vector3`
`negate(Vector3 dest)`
`final Vector3`
`normalize()`
`final Vector3`
`normalize(Vector3 dest)`
`final float`
`normalizeLength()`
`final Vector3`
`set(float x, float y, float z)`
`final Vector3`
`set(Vector3 v)`
`static final Vector3`
`sub(Vector3 v1, Vector3 v2, Vector3 dest)`
`final String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### x

public float x

### y

public float y

### z

public float z

## Constructor Details

### Vector3

public Vector3()

### Vector3

public Vector3(float x, float y, float z)

### Vector3

public Vector3(Vector3 v)

## Method Details

### decode

public static final Vector3 decode(short n, Vector3 dest)

### decode

public static final Vector3 decode(short n)

### encode

public final short encode()

### get

public float get(int i)

### length

public final float length()

### lengthSquared

public final float lengthSquared()

### negate

public final Vector3 negate()

### negate

public final Vector3 negate(Vector3 dest)

### mul

public final Vector3 mul(float s)

### mul

public final Vector3 mul(float s, Vector3 dest)

### div

public final Vector3 div(float d)

### div

public final Vector3 div(float d, Vector3 dest)

### normalizeLength

public final float normalizeLength()

### normalize

public final Vector3 normalize()

### normalize

public final Vector3 normalize(Vector3 dest)

### set

public final Vector3 set(float x, float y, float z)

### set

public final Vector3 set(Vector3 v)

### dot

public final float dot(float vx, float vy, float vz)

### dot

public static final float dot(Vector3 v1, Vector3 v2)

### cross

public static final Vector3 cross(Vector3 v1, Vector3 v2, Vector3 dest)

### add

public static final Vector3 add(Vector3 v1, Vector3 v2, Vector3 dest)

### sub

public static final Vector3 sub(Vector3 v1, Vector3 v2, Vector3 dest)

### toString

public final String toString()

Overrides:
  `toString` in class `Object`