Draft
Conversation
Feature/math 3.0
…or identity matrices.
…iplyAddEstimate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a continuation of #2459 and supersedes it.
Status snapshot:
Vector structs:
TdefinesIRootFunctions<T>.+,-,*,/, and%operators defined between two vectors of the same type which returns a vector which has had each operation applied component-wise.+,-,*,/, and%operators defined between a vector and a scalar value that matches the generic type which returns a vector which has had each operation applied component-wise with the scalar value. Both vector first and scalar first should be implemented.-unary operator which returns the negated vector.+unary operator which returns the vector.Vector2D<T>toVector2D<float>)Matrix2Xn,Matrix3Xn, andMatrix4Xn) and return a vector containing the output (type should match the outer type e.g.Vector2D.Transform(Matrix4X4)returnsVector2D)VectorND<T> * MatrixNXMoperators where N is the same for both Vector and Matrix, but M is any numberMatrix2Xn,Matrix3Xn, andMatrix4Xn) and return a vector containing the output (type should match the outer type e.g.Vector2D.Transform(Matrix4X4)returnsVector2D)BitwiseAnd,BitwiseOr, andBitwiseXorstatic methods defined between two vectors which returns a vector which has had these operators applied on a component-wise basis.BitwiseAnd,BitwiseOr, andBitwiseXorstatic methods operators defined between a vectors and a scalar value that matches the generic type which returns a vector which has had these operators applied on a component-wise basis with the scalar.BitwiseNotstatic method defined which negates the bits of the vector components. (BitwiseComplement?)TimplementsIRootFunctions<T>The following static Vector properties which have the given value for all componentsVectorND<int>, where N matches the dimensionality of the vectorint digitsMidpointRounding modeint digits, MidpointRounding modeVectorND<int>, where N matches the dimensionality of the vectorVectorND<int>, where N matches the dimensionality of the vectorVectorND<int>, where N matches the dimensionality of the vectorVectorND<int>, where N matches the dimensionality of the vectorSystem.Runtime.Intrinsics.Vector64<TScalar>System.Runtime.Intrinsics.Vector128<TScalar>System.Runtime.Intrinsics.Vector256<TScalar>System.Runtime.Intrinsics.Vector512<TScalar>Matrix structs must fulfill the following requirements:
IEquatable<T>whereTis the same matrix classSeveral of these functions exist, but not for all types or not for both LH/RH versions.
A Quaternion struct:
Twhich is constrained byINumber<T>, IRootFunctions<T>, ITrigonometricFunctions<T>representing the scalar typeVector3D<T>and a Scalar, with the vector 3 mapping to X, Y, Z and the Scalar to the WVector4D<T>Vector3D<T>Axis property mapping to (X, Y, Z)+,-,*, and/between two Quaternions*withTmultiplying each component by the scalar value returning a new quaternion~A Dot function which takes another Quaternion and returns its the dotproduct between themInverseInvert function must be available but it returns the inverse rather than affecting the originalA Concatenate function which takes another Quaternion and concatenates it with this quaternionA Conjugate function which returns the conjugate of this quaternionVector3D<T>and an angle and returns a Quaternion representing that rotationVector3D<T>and outputs a Quaternion representing that rotationGeometric Types:
Geometric Types details: