Skip to content

Commit

Permalink
[orx-shapes] Add RectifiedPath.curvature
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Jan 4, 2025
1 parent 8218805 commit 08e7a5a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ abstract class RectifiedPath<T : EuclideanVector<T>>(
}
}

/**
* Evaluate curvature for [t]
*/
fun curvature(t: Double): Double {
return originalPath.curvature(rectify(safe(t)))
}

abstract fun sub(t0: Double, t1: Double): Path<T>

/**
Expand Down

0 comments on commit 08e7a5a

Please sign in to comment.