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
560
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
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
120
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
420
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
110
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
190
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.6k
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
2
7.1k
エンジニアが挑む、限界までの越境
nealle
1
280
Qiita Bash
mercury_dev0517
2
210
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
130
Make Parsers Compatible Using Automata Learning
makenowjust
2
5.7k
監視 やばい
syossan27
11
10k
Cursor/Devin全社導入の理想と現実
saitoryc
24
18k
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
800
It's Worth the Effort
3n
184
28k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
Into the Great Unknown - MozCon
thekraken
38
1.7k
Become a Pro
speakerdeck
PRO
27
5.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Build your cross-platform service in a week with App Engine
jlugia
230
18k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
760
The Invisible Side of Design
smashingmag
299
50k
Fireside Chat
paigeccino
37
3.4k
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