Unit ADimR3

Description

ADim real vector space utilities.

Provides factory functions for constructing real vectors (TR2Vector, TR3Vector, TR4Vector) and real matrices (TR2Matrix, TR3Matrix, TR4Matrix) from their individual double components.

@copyright 2025-2026 Melchiorre Caruso @license GNU Lesser General Public License v3 with modified LGPL exception.

This unit is part of the ADim library, distributed under the GNU Lesser General Public License v3 (LGPL v3) with the following special exception:

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Overview

Functions and Procedures

function Matrix(const m11, m12, m21, m22: double): TR2Matrix;
function Matrix(const m11, m12, m13, m21, m22, m23, m31, m32, m33: double): TR3Matrix;
function Matrix(const m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44: double): TR4Matrix;
function Vector(const m1, m2: double): TR2Vector;
function Vector(const m1, m2, m3: double): TR3Vector;
function Vector(const m1, m2, m3, m4: double): TR4Vector;

Description

Functions and Procedures

function Matrix(const m11, m12, m21, m22: double): TR2Matrix;

Creates a 2×2 real matrix from its elements in row-major order. The result is: | m11 m12 | | m21 m22 |

Parameters
m11
Element at row 1, column 1.
m12
Element at row 1, column 2.
m21
Element at row 2, column 1.
m22
Element at row 2, column 2.
function Matrix(const m11, m12, m13, m21, m22, m23, m31, m32, m33: double): TR3Matrix;

Creates a 3×3 real matrix from its elements in row-major order. The result is: | m11 m12 m13 | | m21 m22 m23 | | m31 m32 m33 |

Parameters
m11
Element at row 1, column 1.
m12
Element at row 1, column 2.
m13
Element at row 1, column 3.
m21
Element at row 2, column 1.
m22
Element at row 2, column 2.
m23
Element at row 2, column 3.
m31
Element at row 3, column 1.
m32
Element at row 3, column 2.
m33
Element at row 3, column 3.
function Matrix(const m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44: double): TR4Matrix;

Creates a 4×4 real matrix from its elements in row-major order. The result is: | m11 m12 m13 m14 | | m21 m22 m23 m24 | | m31 m32 m33 m34 | | m41 m42 m43 m44 |

Parameters
m11
Element at row 1, column 1.
m12
Element at row 1, column 2.
m13
Element at row 1, column 3.
m14
Element at row 1, column 4.
m21
Element at row 2, column 1.
m22
Element at row 2, column 2.
m23
Element at row 2, column 3.
m24
Element at row 2, column 4.
m31
Element at row 3, column 1.
m32
Element at row 3, column 2.
m33
Element at row 3, column 3.
m34
Element at row 3, column 4.
m41
Element at row 4, column 1.
m42
Element at row 4, column 2.
m43
Element at row 4, column 3.
m44
Element at row 4, column 4.
function Vector(const m1, m2: double): TR2Vector;

Creates a 2-component real vector from two scalar values. The result is v = (m1, m2)ᵀ.

Parameters
m1
The first component.
m2
The second component.
function Vector(const m1, m2, m3: double): TR3Vector;

Creates a 3-component real vector from three scalar values. The result is v = (m1, m2, m3)ᵀ.

Parameters
m1
The first component.
m2
The second component.
m3
The third component.
function Vector(const m1, m2, m3, m4: double): TR4Vector;

Creates a 4-component real vector from four scalar values. The result is v = (m1, m2, m3, m4)ᵀ.

Parameters
m1
The first component.
m2
The second component.
m3
The third component.
m4
The fourth component.

Author


Generated by PasDoc 1.0.4.