Skip to content

Commit c392cd7

Browse files
committed
fix: pixel conversion comments
1 parent 24cd710 commit c392cd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,19 +912,19 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
912912
return mContext.resources.displayMetrics.density.toDouble()
913913
}
914914

915-
/** Converts a point from density-independent pixels to physical pixels. */
915+
/** Converts a point from physical pixels to density-independent pixels. */
916916
private fun toDp(pointPx: ScreenCoordinate): ScreenCoordinate {
917917
val density = getDisplayDensity()
918918
return ScreenCoordinate(pointPx.x / density, pointPx.y / density)
919919
}
920920

921-
/** Converts a point from physical pixels to density-independent pixels. */
921+
/** Converts a point from density-independent pixels to physical pixels. */
922922
private fun toPx(pointDp: ScreenCoordinate): ScreenCoordinate {
923923
val density = getDisplayDensity()
924924
return ScreenCoordinate(pointDp.x * density, pointDp.y * density)
925925
}
926926

927-
/** Converts a bounding box from physical pixels to density-independent pixels. */
927+
/** Converts a bounding box from density-independent pixels to physical pixels. */
928928
private fun toPx(boxDp: ScreenBox): ScreenBox {
929929
val density = getDisplayDensity()
930930
return ScreenBox(

0 commit comments

Comments
 (0)