Hexagon
Loading...
Searching...
No Matches
HexVectorOps Class Reference

Class for general vector operations (multiplication, division, and absolute value) for all vector types. More...

Static Public Member Functions

static Vector3 Scale (this Vector3 a, Vector3 b)
 Multiplies two Vector3 instances element-wise and returns the result.
 
static Vector3Int Scale (this Vector3Int a, Vector3Int b)
 Multiplies two Vector3Int instances element-wise and returns the result.
 
static Vector2 Scale (this Vector2 a, Vector2 b)
 Multiplies two Vector2 instances element-wise and returns the result.
 
static Vector2Int Scale (this Vector2Int a, Vector2Int b)
 Multiplies two Vector2Int instances element-wise and returns the result.
 
static Vector3 ScaleX (this Vector3 vec, float factor)
 Scales only X component of the given vector.
 
static Vector3 ScaleY (this Vector3 vec, float factor)
 Scales only Y component of the given vector.
 
static Vector3 ScaleZ (this Vector3 vec, float factor)
 Scales only Z component of the given vector.
 
static Vector2 ScaleX (this Vector2 vec, float factor)
 Scales only X component of the given vector.
 
static Vector2 ScaleY (this Vector2 vec, float factor)
 Scales only Y component of the given vector.
 
static Vector3 Divide (this Vector3 a, Vector3 b)
 Divides two Vector3 instances element-wise and returns the result.
 
static Vector3Int Divide (this Vector3Int a, Vector3Int b)
 Divides two Vector3Int instances element-wise and returns the result.
 
static Vector2 Divide (this Vector2 a, Vector2 b)
 Divides two Vector2 instances element-wise and returns the result.
 
static Vector2Int Divide (this Vector2Int a, Vector2Int b)
 Divides two Vector2Int instances element-wise and returns the result.
 
static Vector3 Abs (this Vector3 vector)
 Returns a new Vector3 with the absolute values of the components.
 
static Vector3Int Abs (this Vector3Int vector)
 Returns a new Vector3Int with the absolute values of the components.
 
static Vector2 Abs (this Vector2 vector)
 Returns a new Vector2 with the absolute values of the components.
 
static Vector2Int Abs (this Vector2Int vector)
 Returns a new Vector2Int with the absolute values of the components.
 
static Vector3 Pow (this Vector3 vector, float exponent)
 Raises each component to the specified exponent.
 
static Vector2 Pow (this Vector2 vector, float exponent)
 Raises each component to the specified exponent.
 
static Vector3 Sqrt (this Vector3 vector)
 Takes square root of each component.
 
static Vector2 Sqrt (this Vector2 vector)
 Takes square root of each component.
 
static Vector2 Average (this IEnumerable< Vector2 > vectors)
 Returns an average point of the given list of vectors.
 
static Vector3 Average (this IEnumerable< Vector3 > vectors)
 Returns an average point of the given list of vectors.
 

Detailed Description

Class for general vector operations (multiplication, division, and absolute value) for all vector types.

Member Function Documentation

◆ Abs() [1/4]

static Vector2 HexVectorOps.Abs ( this Vector2 vector)
static

Returns a new Vector2 with the absolute values of the components.

◆ Abs() [2/4]

static Vector2Int HexVectorOps.Abs ( this Vector2Int vector)
static

Returns a new Vector2Int with the absolute values of the components.

◆ Abs() [3/4]

static Vector3 HexVectorOps.Abs ( this Vector3 vector)
static

Returns a new Vector3 with the absolute values of the components.

◆ Abs() [4/4]

static Vector3Int HexVectorOps.Abs ( this Vector3Int vector)
static

Returns a new Vector3Int with the absolute values of the components.

◆ Average() [1/2]

static Vector2 HexVectorOps.Average ( this IEnumerable< Vector2 > vectors)
inlinestatic

Returns an average point of the given list of vectors.

◆ Average() [2/2]

static Vector3 HexVectorOps.Average ( this IEnumerable< Vector3 > vectors)
inlinestatic

Returns an average point of the given list of vectors.

◆ Divide() [1/4]

static Vector2 HexVectorOps.Divide ( this Vector2 a,
Vector2 b )
static

Divides two Vector2 instances element-wise and returns the result.

Ensure the second vector does not have zero components to avoid division by zero.

◆ Divide() [2/4]

static Vector2Int HexVectorOps.Divide ( this Vector2Int a,
Vector2Int b )
static

Divides two Vector2Int instances element-wise and returns the result.

Ensure the second vector does not have zero components to avoid division by zero.

◆ Divide() [3/4]

static Vector3 HexVectorOps.Divide ( this Vector3 a,
Vector3 b )
static

Divides two Vector3 instances element-wise and returns the result.

Ensure the second vector does not have zero components to avoid division by zero.

◆ Divide() [4/4]

static Vector3Int HexVectorOps.Divide ( this Vector3Int a,
Vector3Int b )
static

Divides two Vector3Int instances element-wise and returns the result.

Ensure the second vector does not have zero components to avoid division by zero.

◆ Pow() [1/2]

static Vector2 HexVectorOps.Pow ( this Vector2 vector,
float exponent )
static

Raises each component to the specified exponent.

◆ Pow() [2/2]

static Vector3 HexVectorOps.Pow ( this Vector3 vector,
float exponent )
static

Raises each component to the specified exponent.

◆ Scale() [1/4]

static Vector2 HexVectorOps.Scale ( this Vector2 a,
Vector2 b )
static

Multiplies two Vector2 instances element-wise and returns the result.

◆ Scale() [2/4]

static Vector2Int HexVectorOps.Scale ( this Vector2Int a,
Vector2Int b )
static

Multiplies two Vector2Int instances element-wise and returns the result.

◆ Scale() [3/4]

static Vector3 HexVectorOps.Scale ( this Vector3 a,
Vector3 b )
static

Multiplies two Vector3 instances element-wise and returns the result.

◆ Scale() [4/4]

static Vector3Int HexVectorOps.Scale ( this Vector3Int a,
Vector3Int b )
static

Multiplies two Vector3Int instances element-wise and returns the result.

◆ ScaleX() [1/2]

static Vector2 HexVectorOps.ScaleX ( this Vector2 vec,
float factor )
static

Scales only X component of the given vector.

◆ ScaleX() [2/2]

static Vector3 HexVectorOps.ScaleX ( this Vector3 vec,
float factor )
static

Scales only X component of the given vector.

◆ ScaleY() [1/2]

static Vector2 HexVectorOps.ScaleY ( this Vector2 vec,
float factor )
static

Scales only Y component of the given vector.

◆ ScaleY() [2/2]

static Vector3 HexVectorOps.ScaleY ( this Vector3 vec,
float factor )
static

Scales only Y component of the given vector.

◆ ScaleZ()

static Vector3 HexVectorOps.ScaleZ ( this Vector3 vec,
float factor )
static

Scales only Z component of the given vector.

◆ Sqrt() [1/2]

static Vector2 HexVectorOps.Sqrt ( this Vector2 vector)
static

Takes square root of each component.

◆ Sqrt() [2/2]

static Vector3 HexVectorOps.Sqrt ( this Vector3 vector)
static

Takes square root of each component.


The documentation for this class was generated from the following file: