mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
Changed pi symbol to 'pi'
This commit is contained in:
parent
46de83b4b1
commit
3f0c5047f1
@ -1,5 +1,5 @@
|
||||
(defmodule Double
|
||||
(def π 3.141592653589793)
|
||||
(def pi 3.141592653589793)
|
||||
(def e 2.718281828459045)
|
||||
(register = (Fn [Double Double] Bool))
|
||||
(register < (Fn [Double Double] Bool))
|
||||
|
@ -1,5 +1,5 @@
|
||||
(defmodule Float
|
||||
(def π 3.1415926536f)
|
||||
(def pi 3.1415926536f)
|
||||
(register neg (Fn [Float] Float))
|
||||
(register + (Fn [Float Float] Float))
|
||||
(register - (Fn [Float Float] Float))
|
||||
|
@ -1,7 +1,7 @@
|
||||
(defmodule Geometry
|
||||
(defn degree-to-radians [n]
|
||||
(Double.* n (Double./ Double.π 180.0)))
|
||||
(Double.* n (Double./ Double.pi 180.0)))
|
||||
|
||||
(defn radians-to-degree [n]
|
||||
(Double.* n (Double./ 180.0 Double.π)))
|
||||
(Double.* n (Double./ 180.0 Double.pi)))
|
||||
)
|
||||
|
@ -25,7 +25,7 @@
|
||||
;; (definterface min (λ [a a] a))
|
||||
;;(definterface from-string (λ [a] String))
|
||||
|
||||
(definterface π a)
|
||||
(definterface pi a)
|
||||
|
||||
;; These interfaces are defined internally:
|
||||
;;(definterface copy (λ [&a] a))
|
||||
|
@ -58,7 +58,7 @@
|
||||
---
|
||||
# Defining things
|
||||
```
|
||||
(defn circle-area [r] (* π (* r r))
|
||||
(defn circle-area [r] (* pi (* r r))
|
||||
|
||||
(defn id [x] x)
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
# Type inference
|
||||
|
||||
```
|
||||
(defn circle-area [r] (* π (* r r)) : (λ [Float] Float)
|
||||
(defn circle-area [r] (* pi (* r r)) : (λ [Float] Float)
|
||||
|
||||
(defn id [x] x) : (λ [a] a)
|
||||
|
||||
@ -359,7 +359,7 @@ Double : Module = {
|
||||
sin : (λ [Double] Double)
|
||||
str : (λ [Double] String)
|
||||
to-int : (λ [Double] Int)
|
||||
π : Double
|
||||
pi : Double
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user