![]() |
Nano Brain for Unity v0.1
|
A spherical vector.
<remark>This is a struct such that it is a value type and cannot be null
Public Member Functions | |
| Spherical (float distance, Direction direction) | |
| Create a spherical vector. | |
| readonly Vector3 | ToVector3 () |
| readonly Vector3Float | ToVector3 () |
| override readonly string | ToString () |
| override readonly bool | Equals (object o) |
| override readonly int | GetHashCode () |
Static Public Member Functions | |
| static Spherical | Degrees (float distance, float horizontal, float vertical) |
| Create spherical vector. All given angles are in degrees. | |
| static Spherical | Radians (float distance, float horizontal, float vertical) |
| static Spherical | FromVector3 (Vector3 v) |
| static Spherical | FromVector3 (Vector3Float v) |
| static Spherical | operator+ (Spherical s1, Spherical s2) |
| static Spherical | operator* (Spherical v, float d) |
| static bool | operator== (Spherical v1, Spherical v2) |
| static bool | operator!= (Spherical v1, Spherical v2) |
| static float | Distance (Spherical v1, Spherical v2) |
| static Spherical | Average (Spherical v1, Spherical v2) |
| static Spherical | Sum (List< Spherical > vectors) |
| static Spherical | Average (List< Spherical > vectors) |
Public Attributes | |
| float | distance |
| The distance in meters. | |
| Direction | direction |
| The direction of the vector. | |
Static Public Attributes | |
| static readonly Spherical | zero = new(0, Direction.forward) |
| A spherical vector with zero degree angles and distance. | |
| static readonly Spherical | forward = new(1, Direction.forward) |
| A normalized forward-oriented vector. | |
Properties | |
| readonly float | magnitude [get] |
| Spherical | normalized [get] |
| LinearAlgebra.Spherical.Spherical | ( | float | distance, |
| Direction | direction | ||
| ) |
Create a spherical vector.
| distance | The distance in meters |
| direction | The direction of the vector |
|
static |
Create spherical vector. All given angles are in degrees.
| distance | The distance in meters |
| horizontal | The horizontal angle in degrees |
| vertical | The vertical angle in degrees |
| float LinearAlgebra.Spherical.distance |
The distance in meters.