21 lines · 278 B · Perl
RawDownload
#!/usr/bin/perl use warnings;use strict; die "Usage: makefixed.pl <value>\n" if (@ARGV != 1); my $val = shift @ARGV; $val *= (1 << 10); # Round away from zeroif ($val < 0) {	$val -= 0.5;} else {	$val += 0.5;} # Truncates back towards zeroprintf("0x%.8x\n", $val); 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t