Generation

generate functionSun, 13 Nov 2022

Round numbers to the nearest 0.11 value

// Build double RoundToNearest(double x, double y) => Math.Truncate(x / y + 0.5) * y; // Use RoundToNearest(4.4, 0.11);

Questions about programming?Chat with your personal AI assistant