Show / Hide Table of Contents

Class Vector3Extensions

Unity Vector3 extension methods.

Inheritance
System.Object
Vector3Extensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StansAssets.Foundation.Extensions
Assembly: cs.temp.dll.dll
Syntax
public static class Vector3Extensions

Methods

MultipliedBy(in Vector3, Single)

Multiplies each element in Vector3 by the given scalar.

Declaration
public static Vector3 MultipliedBy(this in Vector3 a, float s)
Parameters
Type Name Description
Vector3 a

The current vector.

System.Single s

The given scalar.

Returns
Type Description
Vector3

Returns new Vector3 containing the multiplied components.

MultipliedBy(in Vector3, Vector3)

Multiplies each element in Vector3 a by the corresponding element of b.

Declaration
public static Vector3 MultipliedBy(this in Vector3 a, Vector3 b)
Parameters
Type Name Description
Vector3 a

The current vector.

Vector3 b

The given vector.

Returns
Type Description
Vector3

Returns new Vector3 containing the multiplied components of the given vectors.

SmoothDampEuler(in Vector3, Vector3, ref Vector3, Single)

Smooths a Vector3 that represents euler angles.

Declaration
public static Vector3 SmoothDampEuler(this in Vector3 current, Vector3 target, ref Vector3 velocity, float smoothTime)
Parameters
Type Name Description
Vector3 current

The current Vector3 value.

Vector3 target

The target Vector3 value.

Vector3 velocity

A reference Vector3 used internally.

System.Single smoothTime

The time to smooth, in seconds.

Returns
Type Description
Vector3

The smoothed Vector3 value.

SqrDistance(in Vector3, in Vector3)

Calculates a squared distance between current and given vectors.

Declaration
public static float SqrDistance(this in Vector3 a, in Vector3 b)
Parameters
Type Name Description
Vector3 a

The current vector.

Vector3 b

The given vector.

Returns
Type Description
System.Single

Returns squared distance between current and given vectors.

In This Article
Back to top Generated by DocFX