Implement `View.positionWithAnchor` when intersection types are available
- Dominant language
- Kotlin
- Stars
- 3k
- Forks
- 148
- Avg merge
- 13h 44m
- Merged PRs (30d)
- 1
Description
```kotlin
fun T.positionWithAnchor(position: Point, anchor: Anchor): T {
pos = position + size * Vector2(anchor.sx, anchor.sy)
this.anchor(anchor)
return this
}
```
alternatively:
```kotlin
fun T.positionWithAnchor(position: Point, anchor: Anchor): T {
pos = position + size * Vector2(anchor.sx, anchor.sy)
this.anchor(anchor)
return this
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the View, Anchorable, RectBase, Point, Vector2, and Anchor definitions and checking how existing positioning and anchor helpers are implemented. Determine whether the requested generic extension is supported by the available Kotlin intersection types, then verify that the chosen signature positions and returns the view as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100