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
550
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
Strategic Design (DDD)for the Frontend @DDD Meetup Stuttgart
manfredsteyer
PRO
0
100
Kubernetesで実現できるPlatform Engineering の現在地
nwiizo
3
1.9k
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
2.9k
AHC 044 混合整数計画ソルバー解法
kiri8128
0
330
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Webinar 2025
danielsogl
0
120
Qiita Bash
mercury_dev0517
1
190
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
500
AWS で実現する安全な AI エージェントの作り方 〜 Bedrock Engineer の実装例を添えて 〜 / how-to-build-secure-ai-agents
gawa
8
710
State of Namespace
tagomoris
4
770
gen_statem - OTP's Unsung Hero
whatyouhide
1
200
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
160
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
13
1.4k
Why Our Code Smells
bkeepers
PRO
336
57k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
520
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
Done Done
chrislema
183
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
650
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
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