Skip to content

Instantly share code, notes, and snippets.

@bayramcetin
Created December 15, 2023 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayramcetin/37402016877aa7ac8f78009232c86b43 to your computer and use it in GitHub Desktop.
Save bayramcetin/37402016877aa7ac8f78009232c86b43 to your computer and use it in GitHub Desktop.
X++ Round Code
internal final class ETG_BC_RoundRunnableClass
{
/// <summary>
/// Class entry point. The system will call this method when a designated menu
/// is selected or when execution starts and this class is set as the startup class.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
info(strFmt("Yukarı yuvarla 10.49=%1", roundUp(10.49, 1)));
//11
info(strFmt("Aşağı yuvarla 10.51=%1", roundDown(10.51, 1)));
//10
info(strFmt("Yuvarla 10.50=%1", round(10.50, 1)));
//11
info(strFmt("Yuvarla 10.49=%1", round(10.49, 1)));
//10
info(strFmt("Yuvarla 10.51=%1", round(10.51, 1)));
//11
info(strFmt("Küsüratlı yuvarla 10.495000=%1", round(10.495000, 0)));
//10.50
info(strFmt("Küsüratlı yuvarla 10.494999=%1", round(10.494999, 0)));
//10.49
info(strFmt("Küsüratlı yuvarla 10.495111=%1", round(10.495111, 0)));
//10.50
info(strFmt("Küsüratlı yuvarla 10.654444=%1", decRound(10.654444, 2)));
//10.65
info(strFmt("Küsüratlı yuvarla 10.655555=%1", decRound(10.655555, 2)));
//10.66
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment