memea

Function scale

Source
pub fn scale(from: usize, to: usize) -> Float
Expand description

Calculates scaling factor between two technology nodes.

This function computes the scaling factor needed to convert measurements from one technology node to another. If either node is not recognized, it returns 1.0 and prints a warning.

§Arguments

  • from - Source technology node in nanometers
  • to - Target technology node in nanometers

§Returns

Scaling factor to convert from source to target technology

§Examples

use memea::scale;

let scaling_factor = scale(65, 28); // Scale from 65nm to 28nm
let scaled_area = original_area * scaling_factor;