Aligned long views over byte arrays and heap ByteBuffers
vitalyd at gmail.com
Wed Jan 20 15:04:06 UTC 2016
I like alignOffset and thought about that too. Main issue is that
isAligned is not idiomatic given it returns an offset adjustment.
On Wednesday, January 20, 2016, MacGregor, Duncan (GE Energy Management) <
duncan.macgregor at ge.com> wrote:
> On 20/01/2016, 14:15, "valhalla-dev on behalf of Paul Sandoz"
> >> On 20 Jan 2016, at 14:27, Vitaly Davidovich <vitalyd at gmail.com
> >>How about alignIndex(int,int)?
> >That might work, although it implies returning an aligned index rather
> >than a modulus associated with the current index and unit size. I think
> >that would be more precise if we include boolean argument for rounding
> >up/down to the nearest aligned index:
> > alignedIndex(int index, int unitSize, boolean roundUp)
> >For rounding down a negative value might be returned. I still prefer a
> >modulus returning method.
> I kind of agree that alignedIndex suggests an actual index is returned.
> How about alignedOffset, or alignedDistance maybe?
Sent from my phone
More information about the valhalla-dev