Skip to content

Instantly share code, notes, and snippets.

@plicease
Last active August 29, 2015 14:18
Show Gist options
  • Save plicease/c53d8a80a3ea15e5285f to your computer and use it in GitHub Desktop.
Save plicease/c53d8a80a3ea15e5285f to your computer and use it in GitHub Desktop.
use FFI::Raw;
my $libm = 'libm.so';
my $fdim = FFI::Raw->new(
$libm, 'fdim',
FFI::Raw::double, # return value
FFI::Raw::double, # arg #1
FFI::Raw::double # arg #2
);
say $fdim->call(7.0, 2.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment