From 78a0e2a289a076814cb404190a3ae6556b9f5a1a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 6 Apr 2017 10:29:32 -0400 Subject: math: Add pi constant. * chickadee/math.scm (pi): New variable. * doc/api.texi (Math): Add "Basics" subsection. --- doc/api.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index 9c568d5..e1f6acc 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -406,11 +406,26 @@ with vectors and matrices and axis-aligned bounding box collision detection. @menu +* Basics:: Commonly used, miscellaneous things. * Vectors:: Euclidean vectors. * Matrices:: Transformation matrices. * Rectangles:: Axis-aligned bounding boxes. @end menu +@node Basics +@subsection Basics + +@defvar {Scheme Variable} pi +An essential constant for all trigonometry. @code{@U{03C0}} is the ratio +of a circle's circumferences to its diameter. Since @code{@U{03C0}} is an +irrational number, the @var{pi} in Chickadee is a mere floating point +approximation that is ``good enough.'' +@end defvar + +@defvar {Scheme Variable} pi/2 +Half of @var{pi}. +@end defvar + @node Vectors @subsection Vectors -- cgit v1.2.3