Geode
Mathematics library supporting vectors, matrices, quaternions, and more.
Constants
Current version of the Geode library.
Class methods
Returns 0 if the value is less than the edge value or 1 if it's greater.
0.edge(1) # => 0
2.edge(1) # => 1
Calculates the linear interpolation between two values.
t is a value from 0 to 1, where 0 represents a and 1 represents b. Any value between 0 and 1 will result in a proportional amount of a and b.
This method uses the precise calculation that does not suffer precision loss from high exponential differences.
Returns a new matrix with the maximum element from each matrix.
Geode.max(Matrix[[1, 2], [3, 4]], Matrix[[4, 3], [2, 1]]) # => [[4, 3], [3, 4]]
Returns a new matrix with the greater value of the element or value.
Geode.max(Matrix[[1, 2], [3, 4]], 2) # => [[2, 2], [3, 4]]
Returns a new vector with the maximum component from each vector.
Geode.max(Vector[1, 2, 3], Vector[3, 2, 1]) # => (3, 2, 3)
Returns a new vector with the greater value of the component or value.
Geode.max(Vector[1, 2, 3], 2) # => (2, 2, 3)
Returns a new matrix with the minimum element from each matrix.
Geode.min(Matrix[[1, 2], [3, 4]], Matrix[[4, 3], [2, 1]) # => [[1, 2], [2, 1 ]]
Returns a new matrix with the lesser value of the element or value.
Geode.min(Matrix[[1, 2], [3, 4]], 2) # => [[1, 2], [2, 2]]
Returns a new vector with the minimum component from each vector.
Geode.min(Vector[1, 2, 3], Vector[3, 2, 1]) # => (1, 2, 1)
Returns a new vector with the lesser value of the component or value.
Geode.min(Vector[1, 2, 3], 2) # => (1, 2, 2)
Nested types
- Geode::Angle(T)
- Geode::CommonMatrix(T, M, N)
- Geode::CommonVector(T, N)
- Geode::Degrees(T)
- Geode::Gradians(T)
- Geode::Matrix(T, M, N)
- Geode::Matrix1
- Geode::Matrix1D
- Geode::Matrix1F
- Geode::Matrix1I
- Geode::Matrix1L
- Geode::Matrix1x1(T)
- Geode::Matrix1x2(T)
- Geode::Matrix1x3(T)
- Geode::Matrix1x4(T)
- Geode::Matrix2
- Geode::Matrix2D
- Geode::Matrix2F
- Geode::Matrix2I
- Geode::Matrix2L
- Geode::Matrix2x1(T)
- Geode::Matrix2x2(T)
- Geode::Matrix2x2Transforms2D(T)
- Geode::Matrix2x2Transforms2DConstructors(T)
- Geode::Matrix2x3(T)
- Geode::Matrix2x4(T)
- Geode::Matrix3
- Geode::Matrix3D
- Geode::Matrix3F
- Geode::Matrix3I
- Geode::Matrix3L
- Geode::Matrix3x1(T)
- Geode::Matrix3x2(T)
- Geode::Matrix3x3(T)
- Geode::Matrix3x3Transforms2D(T)
- Geode::Matrix3x3Transforms2DConstructors(T)
- Geode::Matrix3x3Transforms3D(T)
- Geode::Matrix3x3Transforms3DConstructors(T)
- Geode::Matrix3x4(T)
- Geode::Matrix4
- Geode::Matrix4D
- Geode::Matrix4F
- Geode::Matrix4I
- Geode::Matrix4L
- Geode::Matrix4x1(T)
- Geode::Matrix4x2(T)
- Geode::Matrix4x3(T)
- Geode::Matrix4x4(T)
- Geode::Matrix4x4Transforms3D(T)
- Geode::Matrix4x4Transforms3DConstructors(T)
- Geode::MatrixComparison(M, N)
- Geode::MatrixIterators(T, M, N)
- Geode::MatrixOperations(M, N)
- Geode::MatrixProjections(T)
- Geode::MatrixVectors(M, N)
- Geode::Radians(T)
- Geode::SquareMatrix(T, M, N)
- Geode::Turns(T)
- Geode::Vector(T, N)
- Geode::Vector1(T)
- Geode::Vector1D
- Geode::Vector1F
- Geode::Vector1I
- Geode::Vector1L
- Geode::Vector2(T)
- Geode::Vector2D
- Geode::Vector2F
- Geode::Vector2I
- Geode::Vector2L
- Geode::Vector3(T)
- Geode::Vector3D
- Geode::Vector3F
- Geode::Vector3I
- Geode::Vector3L
- Geode::Vector4(T)
- Geode::Vector4D
- Geode::Vector4F
- Geode::Vector4I
- Geode::Vector4L
- Geode::VectorBase(T, N)
- Geode::VectorComparison(N)
- Geode::VectorGeometry(N)
- Geode::VectorMatrices(T, N)
- Geode::VectorOperations(N)