cspice_isrot

 Abstract I/O Examples Particulars Required Reading Version Index_Entries
```
```

#### Abstract

```
CSPICE_ISROT returns a boolean indicating whether an input matrix
numerically appears to be a rotation matrix to within some tolerance
for the norms of each column and a tolerance for the matrix determinant.

For important details concerning this module's function, please refer to
the CSPICE routine isrot_c.

```

#### I/O

```
Given:

m      a double precision 3x3 matrix

ntol   the double precision tolerance for the norms of the columns of 'm'

dtol   the double precision tolerance for the determinant of 'm'

the call:

is_rotation = cspice_isrot( m, ntol, dtol)

returns a boolean indicating whether 'm' meets the requirements of
a rotation to within 'dtol' and 'ntol'.

```

#### Examples

```
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.

;;
;; Define tolerances for the matrix norm and determinant.
;;
norm_tol = .00001d
det_tol  = .00001d

;;
;; Create an identity matrix.
;;
cspice_ident, rot_ident

;;
;; Check it...
;;
if ( cspice_isrot( r, norm_tol, det_tol ) ) then begin
print, 'Matrix is a rotation matrix'
endif else begin
print, 'Matrix is not a rotation matrix'
endelse

IDL outputs:

Matrix is a rotation matrix

;;
;; Now create a  3-1-3 rotation matrix from some
;; arbitrary angles.
;;
cspice_eul2m, .05d, .75d, 1.d, 3, 1, 3, rot

;;
;; Test rot using cspice_isrot.
;;
if ( cspice_isrot( rot, norm_tol, det_tol) ) then begin
print, 'Matrix is a rotation matrix'
endif else begin
print, 'Matrix is not a rotation matrix'
endelse

IDL outputs:

Matrix is a rotation matrix

;;
;; Now perform a numerical test. A rotation matrix is
;; orthogonal so the invert of the matrix is also the transpose.
;; Therefore, transpose(rot) . rot = ident.
;;
print, transpose(rot) ## rot

IDL outputs:

1.0000000  -4.8097436e-17  -8.3246575e-17
-4.8097436e-17       1.0000000   2.3761649e-18
-8.3246575e-17   2.3761649e-18       1.0000000

'rot' appears as a rotation matrix to within roundoff error for
double precision numbers.

```

```
None.

```

```
ICY.REQ
ROTATION.REQ

```

#### Version

```
-Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

```

#### Index_Entries

```
indicate whether a matrix is a rotation matrix

```
`Wed Apr  5 17:58:02 2017`