/**
 * Copyright 2024 Phenix Real Time Solutions, Inc. Confidential and Proprietary. All Rights Reserved.
 */

export class ViewportUtils {
  /**
   * Converts pixels to viewport width units
   * @param screenWidthInPixels - The screen width in pixels
   * @param elementSizeInPixels - The element size in pixels
   * @returns Viewport width string
   */
  static pxToVw(screenWidthInPixels: number, elementSizeInPixels: number): string {
    return `${(100 * elementSizeInPixels) / screenWidthInPixels}vw`;
  }
}
