Esempio n. 1
0
 /// <summary>
 /// Returns a decvec2 from component-wise application of Trunc ((long)(v)).
 /// </summary>
 public static decvec2 Trunc(decvec2 v) => decvec2.Trunc(v);
Esempio n. 2
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(decvec2 v, decvec2 rhs) => v.Equals(rhs);
Esempio n. 3
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(decvec2 v) => v.GetHashCode();
Esempio n. 4
0
 /// <summary>
 /// Returns a decvec2 with independent and identically distributed values according to a normal/Gaussian distribution with specified mean and variance.
 /// </summary>
 public static decvec2 RandomGaussian(Random random, decvec2 mean, decvec2 variance) => decvec2.RandomGaussian(random, mean, variance);
Esempio n. 5
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator and a format and format provider for each component.
 /// </summary>
 public static string ToString(decvec2 v, string sep, string format, IFormatProvider provider) => v.ToString(sep, format, provider);
Esempio n. 6
0
 /// <summary>
 /// Returns a vector pointing in the same direction as another (faceforward orients a vector to point away from a surface as defined by its normal. If dot(Nref, I) is negative faceforward returns N, otherwise it returns -N).
 /// </summary>
 public static decvec2 FaceForward(decvec2 N, decvec2 I, decvec2 Nref) => decvec2.FaceForward(N, I, Nref);
Esempio n. 7
0
 /// <summary>
 /// Returns a decvec2 with independent and identically distributed uniform values between 'minValue' and 'maxValue'.
 /// </summary>
 public static decvec2 RandomUniform(Random random, decvec2 minValue, decvec2 maxValue) => decvec2.RandomUniform(random, minValue, maxValue);
Esempio n. 8
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator.
 /// </summary>
 public static string ToString(decvec2 v, string sep) => v.ToString(sep);
Esempio n. 9
0
 /// <summary>
 /// Returns the max-norm of this vector.
 /// </summary>
 public static decimal NormMax(decvec2 v) => v.NormMax;
Esempio n. 10
0
 /// <summary>
 /// Returns the sum of all components.
 /// </summary>
 public static decimal Sum(decvec2 v) => v.Sum;
Esempio n. 11
0
 /// <summary>
 /// Returns the two-norm (euclidean length) of this vector.
 /// </summary>
 public static decimal Norm2(decvec2 v) => v.Norm2;
Esempio n. 12
0
 /// <summary>
 /// Returns the squared euclidean length of this vector.
 /// </summary>
 public static decimal LengthSqr(decvec2 v) => v.LengthSqr;
Esempio n. 13
0
 /// <summary>
 /// Returns the maximal component of this vector.
 /// </summary>
 public static decimal MaxElement(decvec2 v) => v.MaxElement;
Esempio n. 14
0
 /// <summary>
 /// Returns the minimal component of this vector.
 /// </summary>
 public static decimal MinElement(decvec2 v) => v.MinElement;
Esempio n. 15
0
 /// <summary>
 /// Calculate the reflection direction for an incident vector (N should be normalized in order to achieve the desired result).
 /// </summary>
 public static decvec2 Reflect(decvec2 I, decvec2 N) => decvec2.Reflect(I, N);
Esempio n. 16
0
 /// <summary>
 /// Returns the p-norm of this vector.
 /// </summary>
 public static double NormP(decvec2 v, double p) => v.NormP(p);
Esempio n. 17
0
 /// <summary>
 /// Calculate the refraction direction for an incident vector (The input parameters I and N should be normalized in order to achieve the desired result).
 /// </summary>
 public static decvec2 Refract(decvec2 I, decvec2 N, decimal eta) => decvec2.Refract(I, N, eta);
Esempio n. 18
0
 /// <summary>
 /// Returns a copy of this vector with length one (undefined if this has zero length).
 /// </summary>
 public static decvec2 Normalized(decvec2 v) => v.Normalized;
Esempio n. 19
0
 /// <summary>
 /// Returns the length of the outer product (cross product, vector product) of the two vectors.
 /// </summary>
 public static decimal Cross(decvec2 l, decvec2 r) => decvec2.Cross(l, r);
Esempio n. 20
0
 /// <summary>
 /// Returns a copy of this vector with length one (returns zero if length is zero).
 /// </summary>
 public static decvec2 NormalizedSafe(decvec2 v) => v.NormalizedSafe;
Esempio n. 21
0
 /// <summary>
 /// Returns a decvec2 with independent and identically distributed values according to a normal/Gaussian distribution with specified mean and variance.
 /// </summary>
 public static decvec2 RandomNormal(Random random, decvec2 mean, decvec2 variance) => decvec2.RandomNormal(random, mean, variance);
Esempio n. 22
0
 /// <summary>
 /// Returns the vector angle (atan2(y, x)) in radians.
 /// </summary>
 public static double Angle(decvec2 v) => v.Angle;
Esempio n. 23
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator and a format for each component.
 /// </summary>
 public static string ToString(decvec2 v, string sep, string format) => v.ToString(sep, format);
Esempio n. 24
0
 /// <summary>
 /// Returns a 2D vector that was rotated by a given angle in radians (CAUTION: result is casted and may be truncated).
 /// </summary>
 public static decvec2 Rotated(decvec2 v, double angleInRad) => v.Rotated(angleInRad);
Esempio n. 25
0
 /// <summary>
 /// Returns the number of components (2).
 /// </summary>
 public static int Count(decvec2 v) => v.Count;
Esempio n. 26
0
 /// <summary>
 /// Returns the inner product (dot product, scalar product) of the two vectors.
 /// </summary>
 public static decimal Dot(decvec2 lhs, decvec2 rhs) => decvec2.Dot(lhs, rhs);
Esempio n. 27
0
 /// <summary>
 /// Returns true iff this equals rhs type- and component-wise.
 /// </summary>
 public static bool Equals(decvec2 v, object obj) => v.Equals(obj);
Esempio n. 28
0
 /// <summary>
 /// Returns the squared euclidean distance between the two vectors.
 /// </summary>
 public static decimal DistanceSqr(decvec2 lhs, decvec2 rhs) => decvec2.DistanceSqr(lhs, rhs);
Esempio n. 29
0
 /// <summary>
 /// Returns true iff distance between lhs and rhs is less than or equal to epsilon
 /// </summary>
 public static bool ApproxEqual(decvec2 lhs, decvec2 rhs, decimal eps = 0.1m) => decvec2.ApproxEqual(lhs, rhs, eps);
Esempio n. 30
0
 /// <summary>
 /// Returns a decvec2 from component-wise application of Fract ((decimal)(v - Math.Floor(v))).
 /// </summary>
 public static decvec2 Fract(decvec2 v) => decvec2.Fract(v);