→ index of namespace default
 
→ index of project tkmath
 
→ index of module tkmath

Class tkmath.Matrix4f


Synopsis: This class represents a single precision 4x4 square matrix.

  Base classes:
  Methods: Description:


The default layout is row-major.


 
→ top of page

Method add
Add another matrix m to this instance
Signature
add(Matrix4fm)
Arguments
Matrix4fm–matrix to add

 
→ top of page
Method BuildEulerXYX4f
Build an euler rotation matrix with XYX convention
Signature
BuildEulerXYX4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerXYZ4f
Build an euler rotation matrix with XYZ convention
Signature
BuildEulerXYZ4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerXZX4f
Build an euler rotation matrix with XZX convention
Signature
BuildEulerXZX4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerXZY4f
Build an euler rotation matrix with XZY convention
Signature
BuildEulerXZY4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerYXY4f
Build an euler rotation matrix with YXY convention
Signature
BuildEulerYXY4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerYXZ4f
Build an euler rotation matrix with YXZ convention
Signature
BuildEulerYXZ4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerYZX4f
Build an euler rotation matrix with YZX convention
Signature
BuildEulerYZX4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerYZY4f
Build an euler rotation matrix with YZY convention
Signature
BuildEulerYZY4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerZXY4f
Build an euler rotation matrix with ZXY convention
Signature
BuildEulerZXY4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerZXZ4f
Build an euler rotation matrix with ZXZ convention
Signature
BuildEulerZXZ4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerZYX4f
Build an euler rotation matrix with ZYX convention
Signature
BuildEulerZYX4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildEulerZYZ4f
Build an euler rotation matrix with ZYZ convention
Signature
BuildEulerZYZ4f(floata,
  floatb,
  floatc 
  )  
 :Matrix4f
Arguments
floata–first angle in radians
floatb–second angle in radians
floatc–third angle in radians
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildLookAtMatrix4f
Build a look at matrix
Signature
BuildLookAtMatrix4f(Vector3feye,
  Vector3fcenter,
  Vector3fup 
  )  
 :Matrix4f
Arguments
Vector3feye–eye direction vector
Vector3fcenter–center of camera vector
Vector3fup–vector for up direction
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildPerspectiveMatrix4f
Builds a perspective matrix
Signature
BuildPerspectiveMatrix4f(floatfov,
  floataspect,
  floatzNear,
  floatzFar 
  )  
 :Matrix4f
Arguments
floatfov–field of view in degrees
floataspect–aspect ratio
floatzNear–zNear value
floatzFar–zFar value
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildRotateMatrix4f
Build a rotation matrix
Signature
BuildRotateMatrix4f(floatangle,
  Vector3faxis 
  )  
 :Matrix4f
Arguments
floatangle–rotation angle
Vector3faxis–rotation axis vector
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildScaleMatrix4f
Build a scale matrix
Signature
BuildScaleMatrix4f(Vector3fscale)
 :Matrix4f
Arguments
Vector3fscale–vector
Returns
Matrix4f–generated matrix

 
→ top of page
Method BuildTranslateMatrix4f
Build a translation matrix
Signature
BuildTranslateMatrix4f(Vector3ft)
 :Matrix4f
Arguments
Vector3ft–translation vector
Returns
Matrix4f–generated matrix

 
→ top of page
Method det
Calculate determinant of matrix
Signature
det():float
Returns
float–value of determinant

 
→ top of page
Method extractPlanes
Extract normalized planes from projection matrix (e.g. for view-frustum culling)
Signature
extractPlanes(Vector4fretN,
  Vector4fretF,
  Vector4fretL,
  Vector4fretR,
  Vector4fretT,
  Vector4fretB 
  )  
Arguments
Vector4fretN–returns Vector4f near plane
Vector4fretF–returns Vector4f far plane
Vector4fretL–returns Vector4f left plane
Vector4fretR–returns Vector4f right plane
Vector4fretT–returns Vector4f top plane
Vector4fretB–returns Vector4f bottom plane

 
→ top of page
Method frustum
Multiply by frustum matrix
Signature
frustum(floatleft,
  floatright,
  floatbottom,
  floattop,
  floatznear,
  floatzfar 
  )  
Arguments
floatleft–
floatright–
floatbottom–
floattop–
floatznear–
floatzfar–

 
→ top of page
Method frustumFovXY
Multiply by frustum matrix (fields of view are in degrees)
Signature
frustumFovXY(floatleft,
  floatright,
  floatbottom,
  floattop,
  floataspect,
  floatfovX,
  floatfovY,
  floatznear,
  floatzfar 
  )  
Arguments
floatleft–
floatright–
floatbottom–
floattop–
floataspect–
floatfovX–
floatfovY–
floatznear–
floatzfar–

 
→ top of page
Method getA
Get value of a element
Signature
getA():float
Returns
float–value of a element

 
→ top of page
Method getAbs
Calculate the Hilbert-Schmidt norm of the matrix
Signature
getAbs():float
Returns
float–scalar matrix norm value

 
→ top of page
Method getAbsSqr
Calculate the squared Hilbert-Schmidt norm of the matrix
Signature
getAbsSqr():float
Returns
float–scalar matrix norm value

 
→ top of page
Method getB
Get value of b element
Signature
getB():float
Returns
float–value of b element

 
→ top of page
Method getC
Get value of c element
Signature
getC():float
Returns
float–value of c element

 
→ top of page
Method getCol
Get column c values
Signature
getCol(intc)
 :Vector4f
Arguments
intc–column number
Returns
Vector4f–vector with values from column c

 
→ top of page
Method getD
Get value of d element
Signature
getD():float
Returns
float–value of d element

 
→ top of page
Method getE
Get value of e element
Signature
getE():float
Returns
float–value of e element

 
→ top of page
Method getF
Get value of f element
Signature
getF():float
Returns
float–value of f element

 
→ top of page
Method getG
Get value of g element
Signature
getG():float
Returns
float–value of g element

 
→ top of page
Method getH
Get value of h element
Signature
getH():float
Returns
float–value of h element

 
→ top of page
Method getI
Get value of i element
Signature
getI():float
Returns
float–value of i element

 
→ top of page
Method getJ
Get value of j element
Signature
getJ():float
Returns
float–value of j element

 
→ top of page
Method getK
Get value of k element
Signature
getK():float
Returns
float–value of k element

 
→ top of page
Method getL
Get value of l element
Signature
getL():float
Returns
float–value of l element

 
→ top of page
Method getM
Get value of m element
Signature
getM():float
Returns
float–value of m element

 
→ top of page
Method getN
Get value of n element
Signature
getN():float
Returns
float–value of n element

 
→ top of page
Method getO
Get value of o element
Signature
getO():float
Returns
float–value of o element

 
→ top of page
Method getP
Get value of p element
Signature
getP():float
Returns
float–value of p element

 
→ top of page
Method getQuaternionf
Tries to find a Quaternion representation of the matrix if possible
Signature
getQuaternionf():Quaternionf
Returns
Quaternionf–Quaternion representation of matrix (or zero quaternion if not possible)

 
→ top of page
Method getRC
Get element at (row, column)
Signature
getRC(introw,
  intcol 
  )  
Arguments
introw–Row number (0..3)
intcol–Column number (0..3)

 
→ top of page
Method getRow
Get row r values
Signature
getRow(intr)
 :Vector4f
Arguments
intr–row number
Returns
Vector4f–vector with values from row r

 
→ top of page
Method getString
Get string representation of matrix ((a, b, c, d), (e, f, g, h), (i, j, k, l), (m, n, o, p))
Signature
getString():String
Returns
String–string representation of matrix

 
→ top of page
Method init
Initialize matrix (in native order, default is row-major)
Signature
init(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati,
  floatj,
  floatk,
  floatl,
  floatm,
  floatn,
  floato,
  floatp 
  )  
Arguments
floata–value for m11 (in row-major order)
floatb–value for m12
floatc–value for m13
floatd–value for m14
floate–value for m21
floatf–value for m22
floatg–value for m23
floath–value for m24
floati–value for m31 (in row-major order, m13 in column-major order)
floatj–value for m32
floatk–value for m33
floatl–value for m34
floatm–value for m41
floatn–value for m42
floato–value for m43
floatp–value for m44

 
→ top of page
Method initColf
Initialize matrix column from scalars
Signature
initColf(intcol,
  floata,
  floatb,
  floatc,
  floatd 
  )  
Arguments
intcol–column index
floata–value for first row
floatb–value for second row
floatc–value for third row
floatd–value for fourth row

 
→ top of page
Method initColumnMajor
Initialize matrix (args are in column major (OpenGL) order, convert to matrix order as required)
Signature
initColumnMajor(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati,
  floatj,
  floatk,
  floatl,
  floatm,
  floatn,
  floato,
  floatp 
  )  
Arguments
floata–value for m11
floatb–value for m21
floatc–value for m31
floatd–value for m41
floate–value for m12
floatf–value for m22
floatg–value for m32
floath–value for m42
floati–value for m13
floatj–value for m23
floatk–value for m33
floatl–value for m43
floatm–value for m14
floatn–value for m24
floato–value for m34
floatp–value for m44

 
→ top of page
Method initColv
Initialize matrix column from vector or array-like object
Signature
initColv(intc,
  Vector4fv 
  )  
Arguments
intc–
Vector4fv–vector with values

 
→ top of page
Method initEulerXYX
Initialize with euler rotation matrix
Signature
initEulerXYX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation (radian angles)
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXYZ
Initialize with euler rotation matrix
Signature
initEulerXYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXZX
Initialize with euler rotation matrix
Signature
initEulerXZX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerXZY
Initialize with euler rotation matrix
Signature
initEulerXZY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYXY
Initialize with euler rotation matrix
Signature
initEulerYXY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYXZ
Initialize with euler rotation matrix
Signature
initEulerYXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYZX
Initialize with euler rotation matrix
Signature
initEulerYZX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerYZY
Initialize with euler rotation matrix
Signature
initEulerYZY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZXY
Initialize with euler rotation matrix
Signature
initEulerZXY(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZXZ
Initialize with euler rotation matrix
Signature
initEulerZXZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZYX
Initialize with euler rotation matrix
Signature
initEulerZYX(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initEulerZYZ
Initialize with euler rotation matrix
Signature
initEulerZYZ(floata,
  floatb,
  floatc 
  )  
Arguments
floata–first rotation
floatb–second rotation
floatc–third rotation

 
→ top of page
Method initFrustum
Signature
initFrustum()

 
→ top of page
Method initFrustumFov
(field of view is in degrees)
Signature
initFrustumFov()

 
→ top of page
Method initFrustumFovXY
(field of view is in degrees)
Signature
initFrustumFovXY(floatleft,
  floatright,
  floatbottom,
  floattop,
  floataspect,
  floatfovX,
  floatfovY,
  floatznear,
  floatzfar 
  )  
Arguments
floatleft–
floatright–
floatbottom–
floattop–
floataspect–
floatfovX–
floatfovY–
floatznear–
floatzfar–

 
→ top of page
Method initIdentity
Initialize with identity matrix.
Signature
initIdentity()

 
→ top of page
Method initLookAt
Init look-at matrix
Signature
initLookAt()

 
→ top of page
Method initOrtho
Signature
initOrtho()

 
→ top of page
Method initPerspective
Init perspective matrix
Signature
initPerspective()

 
→ top of page
Method initRotate
Init rotation matrix (rotate about axis vector)
Signature
initRotate()

 
→ top of page
Method initRotatef
Init X=>Y=>Z rotation matrix (initEulerXYZ())
Signature
initRotatef()

 
→ top of page
Method initRotatev
Init v.x=>v.y=>v.z rotation matrix (initEulerXYZ())
Signature
initRotatev()

 
→ top of page
Method initRowf
Initialize matrix row from scalars
Signature
initRowf(introw,
  floata,
  floatb,
  floatc,
  floatd 
  )  
Arguments
introw–row index
floata–value for first column
floatb–value for second column
floatc–value for third column
floatd–value for fourth column

 
→ top of page
Method initRowMajor
Initialize matrix (args are in row major order, convert to matrix order as required)
Signature
initRowMajor(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati,
  floatj,
  floatk,
  floatl,
  floatm,
  floatn,
  floato,
  floatp 
  )  
Arguments
floata–value for m11
floatb–value for m12
floatc–value for m13
floatd–value for m14
floate–value for m21
floatf–value for m22
floatg–value for m23
floath–value for m24
floati–value for m31
floatj–value for m32
floatk–value for m33
floatl–value for m34
floatm–value for m41
floatn–value for m42
floato–value for m43
floatp–value for m44

 
→ top of page
Method initRowv
Initialize matrix row from vector or array-like object
Signature
initRowv(introw,
  Vector4fv 
  )  
Arguments
introw–row number
Vector4fv–row vector

 
→ top of page
Method initScalef
Signature
initScalef()

 
→ top of page
Method initScalev
Signature
initScalev()

 
→ top of page
Method initSkewXf
a in radians (0..2PI)
Signature
initSkewXf()
Description
see https://www.w3.org/TR/css-transforms-1/#SkewXDefined

 
→ top of page
Method initSkewYf
a in radians (0..2PI)
Signature
initSkewYf()

 
→ top of page
Method initTranslatef
Signature
initTranslatef()

 
→ top of page
Method initTranslatev
Signature
initTranslatev()

 
→ top of page
Method initTranspose
Initialize matrix (flip row/column major order, default is row-major)
Signature
initTranspose(floata,
  floatb,
  floatc,
  floatd,
  floate,
  floatf,
  floatg,
  floath,
  floati,
  floatj,
  floatk,
  floatl,
  floatm,
  floatn,
  floato,
  floatp 
  )  
Arguments
floata–value for m11
floatb–value for m12
floatc–value for m13
floatd–value for m14
floate–value for m21
floatf–value for m22
floatg–value for m23
floath–value for m24
floati–value for m31
floatj–value for m32
floatk–value for m33
floatl–value for m34
floatm–value for m41
floatn–value for m42
floato–value for m43
floatp–value for m44

 
→ top of page
Method invert
Calculate inversion of matrix, so that A*A-1=U
Signature
invert()

 
→ top of page
Method isIdentity
Check if this is an identity matrix (diagonal=1, other=0)
Signature
isIdentity()

 
→ top of page
Method lookAt
Multiply by look-at matrix
Signature
lookAt(Objecteye,
  Objectcenter,
  Objectup 
  )  
Arguments
Objecteye–
Objectcenter–
Objectup–

 
→ top of page
Method mul
Multiply this instance with matrix m (this * m)
Signature
mul(Matrix4fm)
Arguments
Matrix4fm–matrix to multiply

 
→ top of page
Method mulf
Multiply this instance with scalar value s
Signature
mulf(floats)
Arguments
floats–value to multiply

 
→ top of page
Method mulRev
Reverse-multiply matrix m by this instance (m * this)
Signature
mulRev(Matrix4fm)
Arguments
Matrix4fm–matrix to multiply

 
→ top of page
Method mulv
Multiply this instance with a 4dim vector
Signature
mulv(Vector4fv)
 :Vector4f
Arguments
Vector4fv–vector to multiply
Returns
Vector4f–resulting vector

 
→ top of page
Method mulvRev
Multiply this transposed instance with a 4dim vector
Signature
mulvRev(Vector4fv)
 :Vector4f
Arguments
Vector4fv–vector to multiply
Returns
Vector4f–resulting vector

 
→ top of page
Method New
Initialize from an array and return new instance of Matrix4f
Signature
New(Objecto)
 :Matrix4f
Arguments
Objecto–array with values
Returns
Matrix4f–new instance of Matrix4f

 
→ top of page
Method ortho
Multiply by orthogonal matrix
Signature
ortho(floatleft,
  floatright,
  floatbottom,
  floattop,
  floatznear,
  floatzfar 
  )  
Arguments
floatleft–
floatright–
floatbottom–
floattop–
floatznear–
floatzfar–

 
→ top of page
Method perspective
Multiply by perspective matrix
Signature
perspective(floatfov,
  floataspect,
  floatznear,
  floatzfar 
  )  
Arguments
floatfov–
floataspect–
floatznear–
floatzfar–

 
→ top of page
Method rotate
Multiply by rotation matrix
Signature
rotate(floatangle,
  Objectaxis 
  )  
Arguments
floatangle–
Objectaxis–

 
→ top of page
Method rotatef
Multiply by X=>Y=>Z rotation matrix (radian angles)
Signature
rotatef(floatx,
  floaty,
  floatz 
  )  
Arguments
floatx–
floaty–
floatz–

 
→ top of page
Method rotatev
Multiply by v.x=>v.y=>v.z rotation matrix (radian angles)
Signature
rotatev(Vector3fv)
Arguments
Vector3fv–

 
→ top of page
Method scalef
Multiply by scale matrix
Signature
scalef(floatx,
  floaty,
  floatz 
  )  
Arguments
floatx–
floaty–
floatz–

 
→ top of page
Method scalev
Multiply by scale matrix
Signature
scalev(Vector3fv)
Arguments
Vector3fv–

 
→ top of page
Method set
Set element at (row, column) to v
Signature
set(introw,
  intcol,
  floatv 
  )  
Arguments
introw–Row number (0..3)
intcol–Column number (0..3)
floatv–new value for a

 
→ top of page
Method setA
Set a element to v
Signature
setA(floatv)
Arguments
floatv–new value for a

 
→ top of page
Method setB
Set b element to v
Signature
setB(floatv)
Arguments
floatv–new value for b

 
→ top of page
Method setC
Set c element to v
Signature
setC(floatv)
Arguments
floatv–new value for c

 
→ top of page
Method setCol
Set column c with values from v
Signature
setCol(intc,
  Vector4fv 
  )  
Arguments
intc–column number
Vector4fv–Vector4f instance

 
→ top of page
Method setD
Set d element to v
Signature
setD(floatv)
Arguments
floatv–new value for d

 
→ top of page
Method setE
Set e element to v
Signature
setE(floatv)
Arguments
floatv–new value for e

 
→ top of page
Method setF
Set f element to v
Signature
setF(floatv)
Arguments
floatv–new value for f

 
→ top of page
Method setG
Set g element to v
Signature
setG(floatv)
Arguments
floatv–new value for g

 
→ top of page
Method setH
Set h element to v
Signature
setH(floatv)
Arguments
floatv–new value for h

 
→ top of page
Method setI
Set i element to v
Signature
setI(floatv)
Arguments
floatv–new value for i

 
→ top of page
Method setJ
Set j element to v
Signature
setJ(floatv)
Arguments
floatv–new value for j

 
→ top of page
Method setK
Set k element to v
Signature
setK(floatv)
Arguments
floatv–new value for k

 
→ top of page
Method setL
Set l element to v
Signature
setL(floatv)
Arguments
floatv–new value for l

 
→ top of page
Method setM
Set m element to v
Signature
setM(floatv)
Arguments
floatv–new value for m

 
→ top of page
Method setN
Set n element to v
Signature
setN(floatv)
Arguments
floatv–new value for n

 
→ top of page
Method setO
Set o element to v
Signature
setO(floatv)
Arguments
floatv–new value for o

 
→ top of page
Method setP
Set p element to v
Signature
setP(floatv)
Arguments
floatv–new value for p

 
→ top of page
Method setRow
Set row r with values from v
Signature
setRow(intr,
  Vector4fv 
  )  
Arguments
intr–row number
Vector4fv–Vector4f instance

 
→ top of page
Method sub
Substract another matrix m from this instance
Signature
sub(Matrix4fm)
Arguments
Matrix4fm–matrix to substract

 
→ top of page
Method translatef
Multiply by translation matrix
Signature
translatef(floatx,
  floaty,
  floatz 
  )  
Arguments
floatx–
floaty–
floatz–

 
→ top of page
Method translatev
Multiply by translation matrix
Signature
translatev(Vector3fv)
Arguments
Vector3fv–

 
→ top of page
Method transpose
Transpose matrix
Signature
transpose()

 
→ top of page
Method unit
Normalise matrix with Hilbert-Schmidt norm
Signature
unit()

 
→ top of page
Method unitScale
Normalise matrix with Hilbert-Schmidt norm and scale by v afterwards
Signature
unitScale(floatv)
Arguments
floatv–value to scale matrix

 
→ top of page
 

Project Modules:tkmath 
Project Classes:Complexd , Complexf , Math , Matrix , Matrix2d , Matrix2f , Matrix2x3f , Matrix3d , Matrix3f , Matrix4d , Matrix4f , Quaterniond , Quaternionf , Vector2d , Vector2f , Vector3d , Vector3f , Vector4d , Vector4f 
Project Functions:absd , absf , acoscd , acoscf , acosd , acosf , acoshcd , acoshcf , acoshd , acoshf , asincd , asincf , asind , asinf , asinhcd , asinhcf , asinhd , asinhf , atan2d , atan2f , atancd , atancf , atand , atanf , atanhcd , atanhcf , atanhd , atanhf , ceild , ceilf , complexd , complexf , complexfPolar , complexfPolar , coscd , coscf , cosd , cosf , coshcd , coshcf , coshd , coshf , exp10d , exp10f , exp2d , exp2f , expcd , expcf , expd , expf , f16_from_f32 , f32_from_f16 , floord , floorf , fx16_from_f16 , hypotd , hypotf , log10d , log10f , log2d , log2f , logcd , logcf , logd , logf , matrix2d , matrix2f , matrix2x3f , matrix3d , matrix3f , matrix4d , matrix4f , modd , modf , powcd , powcf , powd , powf , quaterniond , quaternionf , relCmpd , relCmpf , relErrCmpd , relErrCmpf , roundd , roundf , sincd , sincf , sind , sinf , sinhcd , sinhcf , sinhd , sinhf , sqrtcd , sqrtcf , sqrtd , sqrtf , tancf , tancf , tand , tanf , tanhcd , tanhcf , tanhd , tanhf , vector2d , vector2f , vector3d , vector3f , vector4d , vector4f 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Tue, 3/Mar/2026 18:10:18