usual-float.c 257 B

123456789101112
  1. // RUN: %clang_cc1 %s -fsyntax-only
  2. typedef float CGFloat;
  3. extern void func(CGFloat);
  4. void foo(int dir, int n, int tindex) {
  5. const float PI = 3.142;
  6. CGFloat cgf = 3.4;
  7. float ang = (float) tindex * (-dir*2.0f*PI/n);
  8. func((CGFloat)cgf/65535.0f);
  9. }