Skip to content

Commit 096b4e1

Browse files
committed
keep RGBAtoInt as internal
1 parent 1f3192f commit 096b4e1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

modules/deck.gl/src/utils/series-color-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function RGBASeriestoIntSeries(r: Series<IndexType>|number,
6767
* @param rgba array of rgba value (a value is optional, default is 255)
6868
* @returns rgba 32 bit signed integer value
6969
*/
70-
export function RGBAtoInt(rgba: number[]): number {
70+
function RGBAtoInt(rgba: number[]): number {
7171
rgba.forEach((value) => {
7272
if (value < 0 || value > 255) { throw new RangeError('rgba values expected within [0,255]'); }
7373
});

modules/deck.gl/test/deckgl-tests.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,9 @@
1313
// limitations under the License.
1414

1515
import {Series, Uint32, Uint8} from '@rapidsai/cudf';
16-
import {mapValuesToColorSeries, RGBASeriestoIntSeries, RGBAtoInt} from '@rapidsai/deck.gl';
16+
import {mapValuesToColorSeries, RGBASeriestoIntSeries} from '@rapidsai/deck.gl';
1717

1818
describe('DeckGL-color-utils', () => {
19-
test('test RGBAtoInt', () => {
20-
expect(RGBAtoInt([255, 255, 255, 255])).toEqual(4294967295);
21-
expect(RGBAtoInt([167, 0, 125, 0])).toEqual(2801827072);
22-
expect(RGBAtoInt([123, 123, 123, 125])).toEqual(2071690109);
23-
expect(() => {RGBAtoInt([123, 123, 256, 125])}).toThrow(RangeError);
24-
});
25-
2619
test('test RGBASeriesToIntSeries', () => {
2720
const r = Series.new({type: new Uint32, data: [255, 167, 123]});
2821
const g = Series.new({type: new Uint32, data: [255, 0, 123]});

0 commit comments

Comments
 (0)