Get the value for a code point as stored in the Trie2.

@param codePoint the code point
@return the value
9262
@Override
    public final int get(int codePoint) {
        int value;
        int ix;
        
        if (codePoint >= 0) {
            if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {
                // Ordinary BMP code point, excluding leading surrogates.
                // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.
                // 32 bit data is stored in the index array itself.
                ix = index[codePoint >> UTRIE2_SHIFT_2];
                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
                value = data32[ix];
                return value;
            } 
            if (codePoint <= 0xffff) {
                // Lead Surrogate Code Point.  A Separate index section is stored for
                // lead surrogate code units and code points.
                //   The main index has the code unit data.
                //   For this function, we need the code point data.
                // Note: this expression could be refactored for slightly improved efficiency, but
                //       surrogate code points will be so rare in practice that it's not worth it.
                ix = index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];
                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
                value = data32[ix];
                return value;
            }
            if (codePoint < highStart) {
                // Supplemental code point, use two-level lookup.
                ix = (UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH) + (codePoint >> UTRIE2_SHIFT_1);
                ix = index[ix];
                ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
                ix = index[ix];
                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
                value = data32[ix];
                return value;
            }
            if (codePoint <= 0x10ffff) {
                value = data32[highValueIndex];
                return value;
            }
        }
        
        // Fall through.  The code point is outside of the legal range of 0..0x10ffff.
        return errorValue;
    }
56653
public static String convertFromUtf32(int codePoint) {
        if (codePoint < 0x10000)
            return Character.toString((char)codePoint);
        codePoint -= 0x10000;
        return new String(new char[]{(char)((codePoint / 0x400) + 0xd800), (char)((codePoint % 0x400) + 0xdc00)});
    }
305273
function readCodepointsFromFile(){
			if (!o.codepointsFile) return {};
			if (!fs.existsSync(o.codepointsFile)){
				logger.verbose('Codepoints file not found');
				return {};
			}

			var buffer = fs.readFileSync(o.codepointsFile);
			return JSON.parse(buffer.toString());
		}
1147991
public Point eval(double t, AbstractPoint p)
    {
        if (t < 0 || t > 1)
        {
            throw new IllegalArgumentException("t="+t+" not in [0,1]");
        }
        p.set(0, 0);
        double c0 = Math.pow(1-t, 3);
        double c1 = 3*Math.pow(1-t, 2)*t;
        double c2 = 3*(1-t)*t*t;
        double c3 = t*t*t;
        p.add(c0*P[start].getX(), c0*P[start].getY());
        p.add(c1*P[start+1].getX(), c1*P[start+1].getY());
        p.add(c2*P[start+2].getX(), c2*P[start+2].getY());
        p.add(c3*P[start+3].getX(), c3*P[start+3].getY());
        return p;
    }
1342842
function fromCodePoint(codepoint) {
			var code = typeof codepoint === 'string' ?
				parseInt(codepoint, 16) : codepoint;
			if (code < 0x10000) {
				return fromCharCode(code);
			}
			code -= 0x10000;
			return fromCharCode(
				0xD800 + (code >> 10),
				0xDC00 + (code & 0x3FF)
			);
		}
616146
public static int[] stringToCodePoints(final String s) {
        final int m = s.codePointCount(0, s.length());
        final int[] codePoints = new int[m];
        int j = 0;
        for (int offset = 0; offset < s.length();) {
            final int codepoint = s.codePointAt(offset);
            codePoints[j++] = codepoint;
            offset += Character.charCount(codepoint);
        }
        return codePoints;
    }
40472
public TriangulationPoint pointCW( TriangulationPoint point )
    {
        if( point == points[0] )
        {
            return points[2];
        }
        else if( point == points[1] )
        {
            return points[0];
        }
        else if( point == points[2] )
        {
            return points[1];
        }
        logger.error( "point location error" );
        throw new RuntimeException("[FIXME] point location error");
    }
925705
public static int countCodePoint(String string, CodePointPredicate predicate)
    {
        int count = 0;
        int size = string.length();
        for (int i = 0; i < size; )
        {
            int codePoint = string.codePointAt(i);
            if (predicate.accept(codePoint))
            {
                count++;
            }
            i += Character.charCount(codePoint);
        }
        return count;
    }
1039438
public static CellPosition of(final Point point) {
        ArgUtils.notNull(point, "point");
        return of(point.y, point.x);
    }
518102
function getCodePoints(codePoints, bounds) {
  bounds = bounds || Number.MAX_VALUE;

  var result = [];

  _.forEach(codePoints, function (glyph, unicode) {
    unicode = parseInt(unicode, 10);
    // Since this is a sparse array, iterating will only yield the valid code points
    if (unicode > bounds) {
      return false;
    }
    result.push({
      unicode: unicode,
      glyph: glyph
    });
  });
  return result;
}
544014
public static int countCodePoint(String source) {
        if (source == null || source.length() == 0) {
            return 0;
        }
        return findCodePointOffset(source, source.length());
    }
471114
public Point2D.Double calc(double t, Point2D.Double... controlPoints)
    {
        if (controlPoints.length != length)
        {
            throw new IllegalArgumentException("control-points length not "+length);
        }
        double[] cp = convert(controlPoints);
        Point2D.Double point = new Point2D.Double();
        calc(t, point::setLocation, cp);
        return point;
    }
1082642
public HistogramDataPointCodec getCodec(final int id) {
    final HistogramDataPointCodec codec = codecs.get(id);
    if (codec == null) {
      throw new IllegalArgumentException("No codec found mapped to ID " + id);
    }
    return codec;
  }
34768
public final int toCodePoints(char[] src, int srcOff, int srcLen, int[] dest, int destOff) {
    if (srcLen < 0) {
      throw new IllegalArgumentException("srcLen must be >= 0");
    }
    int codePointCount = 0;
    for (int i = 0; i < srcLen; ) {
      final int cp = codePointAt(src, srcOff + i, srcOff + srcLen);
      final int charCount = Character.charCount(cp);
      dest[destOff + codePointCount++] = cp;
      i += charCount;
    }
    return codePointCount;
  }
543619
public static int setCodePointAt(int codePoint, Slice utf8, int position)
    {
        if (codePoint < 0) {
            throw new InvalidCodePointException(codePoint);
        }
        if (codePoint < 0x80) {
            // normal ASCII
            // 0xxx_xxxx
            utf8.setByte(position, codePoint);
            return 1;
        }
        if (codePoint < 0x800) {
            // 110x_xxxx 10xx_xxxx
            utf8.setByte(position, 0b1100_0000 | (codePoint >>> 6));
            utf8.setByte(position + 1, 0b1000_0000 | (codePoint & 0b0011_1111));
            return 2;
        }
        if (MIN_SURROGATE <= codePoint && codePoint <= MAX_SURROGATE) {
            throw new InvalidCodePointException(codePoint);
        }
        if (codePoint < 0x1_0000) {
            // 1110_xxxx 10xx_xxxx 10xx_xxxx
            utf8.setByte(position, 0b1110_0000 | ((codePoint >>> 12) & 0b0000_1111));
            utf8.setByte(position + 1, 0b1000_0000 | ((codePoint >>> 6) & 0b0011_1111));
            utf8.setByte(position + 2, 0b1000_0000 | (codePoint & 0b0011_1111));
            return 3;
        }
        if (codePoint < 0x11_0000) {
            // 1111_0xxx 10xx_xxxx 10xx_xxxx 10xx_xxxx
            utf8.setByte(position, 0b1111_0000 | ((codePoint >>> 18) & 0b0000_0111));
            utf8.setByte(position + 1, 0b1000_0000 | ((codePoint >>> 12) & 0b0011_1111));
            utf8.setByte(position + 2, 0b1000_0000 | ((codePoint >>> 6) & 0b0011_1111));
            utf8.setByte(position + 3, 0b1000_0000 | (codePoint & 0b0011_1111));
            return 4;
        }
        // Per RFC3629, UTF-8 is limited to 4 bytes, so more bytes are illegal
        throw new InvalidCodePointException(codePoint);
    }
1017281
private int[] toCodePointArray(String input) {
    int len = input.length();
    int[] codePointArray = new int[input.codePointCount(0, len)];
    for (int i = 0, j = 0; i < len; i = input.offsetByCodePoints(i, 1)) {
      codePointArray[j++] = input.codePointAt(i);
    }
    return codePointArray;
  }
265242
public int[] transferValues(int state, int codePoint)
    {
        if (state < 1)
        {
            return EMPTY_WALK_STATE;
        }
        if ((state != 1) && (isEmpty(state)))
        {
            return EMPTY_WALK_STATE;
        }
        int[] ids = this.charMap.toIdList(codePoint);
        if (ids.length == 0)
        {
            return EMPTY_WALK_STATE;
        }
        for (int i = 0; i < ids.length; i++)
        {
            int c = ids[i];
            if ((getBase(state) + c < getBaseArraySize())
                && (getCheck(getBase(state) + c) == state))
            {
                state = getBase(state) + c;
            }
            else
            {
                return EMPTY_WALK_STATE;
            }
        }
        if (getCheck(getBase(state) + UNUSED_CHAR_VALUE) == state)
        {
            int value = getLeafValue(getBase(getBase(state)
                                                 + UNUSED_CHAR_VALUE));
            return new int[]{state, value};
        }
        return new int[]{state, -1};
    }