Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
requirements with math
Search
Moony-H
March 15, 2025
Programming
0
300
requirements with math
Google Developer Group Korea Super.init(V6) Presentation
Moony-H
March 15, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
研究開発と実装OSSと プロダクトの好循環 / A virtuous cycle of research and development implementation OSS and products
linyows
1
110
Introduction to C Extensions
sylph01
3
140
Your Architecture as a Crime Scene:Forensic Analysis @bastacon 2025 in Frankfurt
manfredsteyer
PRO
0
150
イベントソーシングによってインピーダンスミスマッチから解放された話
tkawae
1
120
Goで作るChrome Extensions / Fukuoka.go #21
n3xem
2
2.1k
OUPC2024 Day 1 解説
kowerkoint
0
320
10년 개발한 프로젝트. 애자일 업무 조직에서 모듈화 했던 경험을 공유합니다.
winterlovedev
PRO
0
380
オレを救った Cline を紹介する
codehex
16
15k
運用しながらリアーキテクチャ
nealle
0
290
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
240
Boost Your Web Performance with Hyperdrive
chimame
1
180
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.1k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
183
22k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
570
Unsuck your backbone
ammeep
669
57k
Making Projects Easy
brettharned
116
6.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
14
1k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Transcript
Korea Android ࣻਵ۽ UI ਃҳࢎ೦ ݅ೞӝ MoonHwi Han super.init(version=6)
ࣻ… જইೞदաਃ? 저는 별로…
ࣻ… જইೞदաਃ?
ࣻ… જইೞदաਃ?
ࣻ… જইೞदաਃ?
Androidীח?
ࣻਸ ਊೠ ҃ , Ҋ١Ү ࣻਵ۽ ࢚ഐਊਸ ٜ݅ ࣻ .
пೣࣻ۽ ӝ ઁযೞӝ Korea Android super.init(version=6)
ਗ Ӓܻӝ “지도 위에 반경을 그리는 기능을 만들어주세요”
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y }
ਗ Ӓܻӝ val dx = (circleCenterPos.x - dragPosX).toDouble() val dy
= (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel
ਗ Ӓܻӝ circle.radius = radMeter
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y val dx = (circleCenterPos.x - dragPosX).toDouble() val dy = (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel circle.radius = if (radMeter > 500) 500.0 else radMeter }
ਗ Ӓܻӝ
ਗ Ӓܻӝ ߈ܴ rਸ 500m۽ ઁೠ
ਗ Ӓܻӝ indicatorח (x, y)о ইצ (x’, y’)ܳ ٮۄоঠ ೠ.
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ val degree = atan2(dy, dx)
ਗ Ӓܻӝ
ਗ Ӓܻӝ val x = radiusLimitPx * cos(degree) * -1
val y = radiusLimitPx * sin(degree) * -1
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y val dx = (circleCenterPos.x - dragPosX).toDouble() val dy = (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel }
ਗ Ӓܻӝ if (radPx > radiusLimitPx) { //пب ҳೞӝ val
degree = atan2(dy, dx) val x = radiusLimitPx * cos(degree) * -1 val y = radiusLimitPx * sin(degree) * -1
ਗ Ӓܻӝ val circleCenterPx = naverMap.projection.toScreenLocation(circle.center) val latLng = naverMap.projection.fromScreenLocation(
PointF( x.toFloat() + circleCenterPx.x, y.toFloat() + circleCenterPx.y ) ) indicator.position = latLng circle.radius = radiusLimit
ਗ Ӓܻӝ else { circleMarker.position = naverMap.projection.fromScreenLocation(PointF(it.x, it.y)) circle.radius =
circle.center.distanceTo(circleMarker.position) }
ਗ Ӓܻӝ
ਗ Ӓܻӝ
пೣࣻ & Vector۽ ഥೞӝ Korea Android super.init(version=6)
ഥ “이미지를 핸들로 회전할 수 있게 해 주세요”
ഥ
ഥ
ഥ
ഥ
ഥ
ഥ ઁ 2 ࢎੋ ߨ
ഥ
ഥ
ഥ fun Offset.distanceTo(offset: Offset): Float = sqrt((this.x - offset.x).pow(2)
+ (this.y - offset.y).pow(2))
ഥ val a = touchPos.distanceTo(prevPos) val b = prevPos.distanceTo(imagePos)
val c = imagePos.distanceTo(touchPos) val cosA = (b.pow(2) + c.pow(2) - a.pow(2)) / (2 * b * c)
ഥ val currDegree = Math.toDegrees(acos(cosA).toDouble()).toFloat()
ഥ
ഥ
ഥ ҳೠ пبח ೦࢚ নࣻ ߑೱ হ
ഥ
߭ఠ ৻
߭ఠ ৻
߭ఠ ৻
߭ఠ ৻ fun Offset.toVectorOffset(offset: Offset) = Offset(offset.x - this.x, offset.y
- this.y) fun Offset.crossProduct(offset: Offset) = this.x * offset.y - this.y * offset.x
߭ఠ ৻ degree = Degree(degree.value + if (product < 0)
+currDegree else -currDegree)
߭ఠ ৻
݃ݴ Korea Android super.init(version=6)
ࣻ… જই࣑աਃ? 저는 별로…
ࣻ… જই࣑աਃ? ࣻҗ ೡࣻ۾ ҳഅ ևযפ.
хࢎפ
None