Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(267)

Delta Between Two Patch Sets: f32/f32.go

Issue 141440043: code review 141440043: go.mobile/f32: float32 math library (Closed)
Left Patch Set: Created 9 years, 6 months ago
Right Patch Set: diff -r 547bbce45af3444f8b5d9a209501de569c9fd460 https://code.google.com/p/go.mobile Created 9 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | f32/f32_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Package f32 implements some linear algebra and GL helpers for float32s.
6 //
7 // WARNING
8 //
9 // The interface to this package is not stable. It will change considerably.
10 // Only use functions that provide package documentation. Semantics are
11 // non-obvious. Be prepared for the package name to change.
12 //
13 // Oh, and it's slow. Sorry.
14 package f32
15
16 import "math"
17
18 type Radian float32
19
20 func Cos(x float32) float32 {
21 return float32(math.Cos(float64(x)))
22 }
23
24 func Sin(x float32) float32 {
25 return float32(math.Sin(float64(x)))
26 }
27
28 func Sqrt(x float32) float32 {
29 return float32(math.Sqrt(float64(x))) // TODO(crawshaw): implement
30 }
31
32 func Tan(x float32) float32 {
33 return float32(math.Tan(float64(x))) // TODO(crawshaw): fast version
34 }
LEFTRIGHT
« no previous file | f32/f32_test.go » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b