mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 16:48:29 -04:00
AP_Math: Change mask value to hexadecimal number.
This commit is contained in:
parent
8b38ce666d
commit
e903cb9945
@ -190,8 +190,8 @@ uint16_t get_random16(void)
|
||||
{
|
||||
static uint32_t m_z = 1234;
|
||||
static uint32_t m_w = 76542;
|
||||
m_z = 36969 * (m_z & 65535) + (m_z >> 16);
|
||||
m_w = 18000 * (m_w & 65535) + (m_w >> 16);
|
||||
m_z = 36969 * (m_z & 0xFFFFu) + (m_z >> 16);
|
||||
m_w = 18000 * (m_w & 0xFFFFu) + (m_w >> 16);
|
||||
return ((m_z << 16) + m_w) & 0xFFFF;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user