MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / rot

Method rot

chapter10/src/main/java/com/seaofnodes/simple/Utils.java:54–54  ·  view source on GitHub ↗
( long x, int n )

Source from the content-addressed store, hash-verified

52
53 // Rotate a long, nice for hashes
54 public static long rot( long x, int n ) { return (x<<n) | (x>>>n); }
55
56 // Fold a 64bit hash into 32 bits
57 public static int fold( long x ) { return (int)((x>>32) ^ x); }

Callers 1

hashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected