getAngles method Null safety

Angles getAngles()

Get a face orientation.

Implementation

Angles getAngles() {
  var exception = _getException();
  final get = _dll_handle.lookupFunction<_RSgetAngles_c, _RSgetAngles_dart>
    (_c_namespace + 'RawSample_getAngles');

  Pointer<Float> y = malloc.allocate(sizeOf<Pointer<Float>>());
  Pointer<Float> p = malloc.allocate(sizeOf<Pointer<Float>>());
  Pointer<Float> r = malloc.allocate(sizeOf<Pointer<Float>>());

  get(_impl, y, p, r, exception);

  checkException(exception, _dll_handle);

  final res = Angles(y.value, p.value, r.value);

  malloc.free(y);
  malloc.free(p);
  malloc.free(r);

  return res;
}