Skip to content

Bug in inverse of 4x4 matrix returning NaN #250

@TsurHerman

Description

@TsurHerman

This came up when working with coordinate transformation matrices in openGL

MWE

julia> using StaticArrays

julia> A =@SMatrix [1 0 0 0;0 0 1 0;0 1 0 0;0 0 0 1]
4×4 StaticArrays.SArray{Tuple{4,4},Int64,2,16}:
 1  0  0  0
 0  0  1  0
 0  1  0  0
 0  0  0  1

julia> inv(A)
4×4 StaticArrays.SArray{Tuple{4,4},Float64,2,16}:
 NaN  NaN  NaN  NaN
 NaN  NaN  NaN  NaN
 NaN  NaN  NaN  NaN
 NaN  NaN  NaN  NaN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions