Learn R Programming

HilbertCurve (version 1.2.2)

hc_offset-HilbertCurve-method: Adjust positions

Description

Adjust positions

Usage

## S3 method for class 'HilbertCurve':
hc_offset(object, x)

Arguments

object
x
positions.

Value

  • A positive numeric value

Details

Since internally positions are transformed to positive integers, if input positions are specified as negative values when initialize the Hilbert curve, a shift will be recorded internally and positions are transformed to positive value automatically.

Examples

Run this code
hc = HilbertCurve(-100, 100)
hc_offset(hc, c(-100, -50, 0, 50, 100))

Run the code above in your browser using DataLab