Class: Vector3

PhotoEditorSDK.Math~ Vector3

Represents a 3-dimensional vector while providing math functions to modify / clone the vector. Fully chainable.

new Vector3(x, y, z)

sdk/core/lib/math/vector3.js, line 29

Creates a Vector3

Name Type Description
x Number
y Number
z Number

Members

staticPhotoEditorSDK.Math.Vector3.NULL

Returns a null vector

Methods

abs(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 254

Makes both numbers of this vector positive

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

add(addend){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 169

Adds the given Vector3 / Numbers to this vector

Name Type Description
addend Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

ceil(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 210

Rounds up the values of this vector

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

clamp(minimum, maximum){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 85

Clamps this vector with the given Vector3 / Number

Name Type Description
minimum Number | PhotoEditorSDK.Math.Vector3
maximum Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

clone(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 63

Creates a clone of this vector

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

copy(other){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 72

Copies the values of the given vector

Name Type Description
other PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

divide(divisor){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 115

Divides this vector by the given Vector3 / Number

Name Type Description
divisor Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

equals(vec){Boolean}

sdk/core/lib/math/vector3.js, line 187

Checks whether the x and y value are the same as the given ones

Name Type Description
vec Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
Boolean

floor(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 221

Rounds down the values of this vector

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

fract(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 232

Fractional part of the values of this vector

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

len(){Number}

sdk/core/lib/math/vector3.js, line 265

Returns the euclidean length of this vector

Returns:
Type Description
Number

max(){Number}

sdk/core/lib/math/vector3.js, line 281

Returns the largest number in this vector

Returns:
Type Description
Number

min(){Number}

sdk/core/lib/math/vector3.js, line 273

Returns the smallest number in this vector

Returns:
Type Description
Number

multiply(factor){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 151

Multiplies the given Vector3 / Number with this vector

Name Type Description
factor Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

round(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 199

Rounds the values of this vector

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

roundDecimal(decimals){Number}

sdk/core/lib/math/vector3.js, line 306

Rounds this vector's values to the given number of decimals

Name Type Description
decimals Number
Returns:
Type Description
Number

set(x, y, z){PhotoEditorSDK.Math.Vectorz}

sdk/core/lib/math/vector3.js, line 52

Sets the given values

Name Type Description
x Number
y Number
z Number
Returns:
Type Description
PhotoEditorSDK.Math.Vectorz

subtract(subtrahend){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 133

Subtracts the given Vector3 / Number from this vector

Name Type Description
subtrahend Number | PhotoEditorSDK.Math.Vector3
Returns:
Type Description
PhotoEditorSDK.Math.Vector3

toInt(){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 243

Convert the values of this vector to integer

Returns:
Type Description
PhotoEditorSDK.Math.Vector3

toObject(){Object}

sdk/core/lib/math/vector3.js, line 289

Returns a POJO of this Vector3

Returns:
Type Description
Object

toString(){String}

sdk/core/lib/math/vector3.js, line 297

Returns a string representation of this vector

Returns:
Type Description
String

staticPhotoEditorSDK.Math.Vector3.fromObject(object){PhotoEditorSDK.Math.Vector3}

sdk/core/lib/math/vector3.js, line 318

Creates a new Vector3 instance from the given Object

Name Type Description
object Object
Returns:
Type Description
PhotoEditorSDK.Math.Vector3