Exemple #1
0
 /// <summary>
 /// Returns a decvec2 from component-wise application of Trunc ((long)(v)).
 /// </summary>
 public static decvec2 Trunc(decvec2 v) => decvec2.Trunc(v);
Exemple #2
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(decvec2 v, decvec2 rhs) => v.Equals(rhs);
Exemple #3
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(decvec2 v) => v.GetHashCode();
Exemple #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);
Exemple #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);
Exemple #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);
Exemple #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);
Exemple #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);
Exemple #9
0
 /// <summary>
 /// Returns the max-norm of this vector.
 /// </summary>
 public static decimal NormMax(decvec2 v) => v.NormMax;
Exemple #10
0
 /// <summary>
 /// Returns the sum of all components.
 /// </summary>
 public static decimal Sum(decvec2 v) => v.Sum;
Exemple #11
0
 /// <summary>
 /// Returns the two-norm (euclidean length) of this vector.
 /// </summary>
 public static decimal Norm2(decvec2 v) => v.Norm2;
Exemple #12
0
 /// <summary>
 /// Returns the squared euclidean length of this vector.
 /// </summary>
 public static decimal LengthSqr(decvec2 v) => v.LengthSqr;
Exemple #13
0
 /// <summary>
 /// Returns the maximal component of this vector.
 /// </summary>
 public static decimal MaxElement(decvec2 v) => v.MaxElement;
Exemple #14
0
 /// <summary>
 /// Returns the minimal component of this vector.
 /// </summary>
 public static decimal MinElement(decvec2 v) => v.MinElement;
Exemple #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);
Exemple #16
0
 /// <summary>
 /// Returns the p-norm of this vector.
 /// </summary>
 public static double NormP(decvec2 v, double p) => v.NormP(p);
Exemple #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);
Exemple #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;
Exemple #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);
Exemple #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;
Exemple #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);
Exemple #22
0
 /// <summary>
 /// Returns the vector angle (atan2(y, x)) in radians.
 /// </summary>
 public static double Angle(decvec2 v) => v.Angle;
Exemple #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);
Exemple #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);
Exemple #25
0
 /// <summary>
 /// Returns the number of components (2).
 /// </summary>
 public static int Count(decvec2 v) => v.Count;
Exemple #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);
Exemple #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);
Exemple #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);
Exemple #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);
Exemple #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);