src/primitives.cpp

changeset 508
7ace3537a560
parent 504
6a1fa662bfc1
child 513
29eb671b34f6
equal deleted inserted replaced
507:fc76d38c3530 508:7ace3537a560
496 496
497 // ============================================================================= 497 // =============================================================================
498 // ----------------------------------------------------------------------------- 498 // -----------------------------------------------------------------------------
499 LDFile* generatePrimitive (PrimitiveType type, int segs, int divs, int num) 499 LDFile* generatePrimitive (PrimitiveType type, int segs, int divs, int num)
500 { // Make the description 500 { // Make the description
501 str frac = ftoa ( ( (float) segs) / divs); 501 str frac = str::number ((float) segs / divs);
502 str name = radialFileName (type, segs, divs, num); 502 str name = radialFileName (type, segs, divs, num);
503 str descr; 503 str descr;
504 504
505 // Ensure that there's decimals, even if they're 0. 505 // Ensure that there's decimals, even if they're 0.
506 if (frac.indexOf (".") == -1) 506 if (frac.indexOf (".") == -1)

mercurial