bemusic/bemuse

View on GitHub
packages/bms/src/speedcore/segment.ts

Summary

Maintainability
A
0 mins
Test Coverage
import DataStructure from 'data-structure'

export const Segment = DataStructure<SpeedSegment>({
  t: 'number',
  x: 'number',
  dx: 'number',
})

export interface SpeedSegment {
  t: number
  x: number
  /** the amount of change in x per t */
  dx: number
  /** whether or not the segment includes the t */
  inclusive: boolean
}