BufferGeometry
Object3D
Raycaster
Camera
CubeCamera
PerspectiveCamera
OrthographicCamera
StereoCamera
Clock
Curve
CurvePath
Path
Shape
ShapePath
ArrowHelper
AxesHelper
BoxHelper
Box3Helper
CameraHelper
DirectionalLightHelper
GridHelper
PolarGridHelper
HemisphereLightHelper
PlaneHelper
PointLightHelper
SkeletonHelper
SpotLightHelper
Light
PointLight
RectAreaLight
SpotLight
DirectionalLight
HemisphereLight
LightShadow
PointLightShadow
AnimationLoader
AudioLoader
BufferGeometryLoader
CompressedTextureLoader
CubeTextureLoader
DataTextureLoader
FileLoader
ImageBitmapLoader
ImageLoader
Loader
LoaderUtils
MaterialLoader
ObjectLoader
TextureLoader
LoadingManager
Material
Box2
Box3
Color
Cylindrical
Euler
Frustum
Interpolant
Line3
MathUtils
Matrix3
Matrix4
Plane
Quaternion
AnimationAction
AnimationClip
AnimationMixer
AnimationObjectGroup
AnimationUtils
keyframeTrack
PropertyBinding
PropertyMixer
BooleanKeyframeTrack
QuaternionKeyframeTrack
StringKeyframeTrack
Audio
AudioAnalyser
AudioContext
AudioListener
PositionalAudio

Matrix3.determinant()

The Matrix3.determinant() method is used to calculate the determinant of a 3x3 matrix object in Three.js. The determinant of a matrix is a scalar value that can be used to determine various properties of the matrix, such as whether it is singular or invertible.

Syntax

matrix.determinant()

Parameters

This method does not take any parameters.

Return Value

The Matrix3.determinant() method returns a scalar value representing the determinant of the matrix.

Examples

let matrix = new THREE.Matrix3().set(
    1, 2, 3,
    4, 5, 6,
    7, 8, 9
);

console.log(matrix.determinant()); // Outputs: 0

In this example, we create a new Matrix3 object and set its values to a 3x3 matrix with increasing values. We then call the determinant() method on the matrix and log the result to the console. Since the determinant of this matrix is 0, we expect the output to be 0.

Notes

The determinant of a matrix can be used to determine various properties of the matrix, such as whether it is invertible or singular. If the determinant is 0, the matrix is singular and cannot be inverted. If the determinant is anything other than 0, the matrix is invertible and can be inverted using techniques such as Gaussian elimination.

See Also