File: math.d

package info (click to toggle)
val-and-rick 0.1a.dfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,140 kB
  • ctags: 5
  • sloc: xml: 349; makefile: 27
file content (21 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * $Id: math.d,v 1.1.1.1 2005/03/13 16:15:04 kenta Exp $
 *
 * Copyright 2005 Kenta Cho. Some rights reserved.
 */
module abagames.util.math;

private import std.math;

/**
 * Math utility methods.
 */
public class Math {
 private:

  public static void normalizeDeg(ref float d) {
    if (d < -PI)
      d = PI * 2 - (-d % (PI * 2));
    d = (d + PI) % (PI * 2) - PI;
  }
}