MCPcopy Index your code
hub / github.com/NetHack/NetHack / sgn

Function sgn

src/hacklib.c:646–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646RESTORE_WARNING_FORMAT_NONLITERAL
647
648/* return the sign of a number: -1, 0, or 1 */
649int
650sgn(int n)
651{
652 return (n < 0) ? -1 : (n != 0);
653}
654
655/* distance between two points, in moves */
656int

Callers 15

find_acFunction · 0.85
find_roll_to_hitFunction · 0.85
hmon_hitmon_dmg_recalcFunction · 0.85
hmon_hitmon_poisonFunction · 0.85
mhitm_knockbackFunction · 0.85
buzzmuFunction · 0.85
spec_appliesFunction · 0.85
getlevFunction · 0.85
findtravelpathFunction · 0.85
nastyFunction · 0.85
dig_up_graveFunction · 0.85
draft_messageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected