Home
last modified time | relevance | path

Searched refs:nInput (Results 1 – 1 of 1) sorted by relevance

/packages/modules/Uwb/service/java/com/android/server/uwb/util/
DUwbUtil.java113 public static float toSignedFloat(int nInput, int nBits, int nDivider) { in toSignedFloat() argument
116 value = (float) (nInput - nBits) / nDivider; in toSignedFloat()
118 value = (float) nInput; in toSignedFloat()
130 public static int twos_compliment(int nInput, int nBits) { in twos_compliment() argument
131 if ((nInput & (1 << (nBits - 1))) != 0) { // if sign bit is set, Eg- nInput=1111, nBits=4 in twos_compliment()
132 nInput -= 1 << nBits; // compute negative value ,0b1111-0b10000= -1 in twos_compliment()
134 return nInput; // return positive value as is in twos_compliment()