Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (C) 2014 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | header: |
| 18 | summary: TODO Add documentation |
| 19 | description: |
| 20 | TODO Add documentation |
| 21 | end: |
| 22 | |
| 23 | function: cross |
| 24 | version: 9 |
| 25 | attrib: const |
| 26 | w: 3, 4 |
| 27 | t: f32 |
| 28 | ret: #2#1 |
| 29 | arg: #2#1 left_vector |
| 30 | arg: #2#1 right_vector |
| 31 | summary: Cross product of two vectors |
| 32 | description: |
| 33 | Computes the cross product of two vectors. |
| 34 | test: vector |
| 35 | end: |
| 36 | |
| 37 | function: distance |
| 38 | version: 9 |
| 39 | attrib: const |
| 40 | w: 1, 2, 3, 4 |
| 41 | t: f32 |
| 42 | ret: #2 |
| 43 | arg: #2#1 left_vector |
| 44 | arg: #2#1 right_vector |
| 45 | summary: Distance between two points |
| 46 | description: |
| 47 | Compute the distance between two points. |
| 48 | |
| 49 | See also @fast_distance(), @native_distance(). |
| 50 | test: vector |
| 51 | end: |
| 52 | |
| 53 | function: dot |
| 54 | version: 9 |
| 55 | attrib: const |
| 56 | w: 1, 2, 3, 4 |
| 57 | t: f32 |
| 58 | ret: #2 |
| 59 | arg: #2#1 left_vector |
| 60 | arg: #2#1 right_vector |
| 61 | summary: Dot product of two vectors |
| 62 | description: |
| 63 | Computes the dot product of two vectors. |
| 64 | test: vector |
| 65 | end: |
| 66 | |
| 67 | function: fast_distance |
| 68 | version: 17 |
| 69 | attrib: const |
| 70 | w: 1, 2, 3, 4 |
| 71 | t: f32 |
| 72 | ret: #2 |
| 73 | arg: #2#1 left_vector |
| 74 | arg: #2#1 right_vector |
| 75 | summary: Approximate distance between two points |
| 76 | description: |
| 77 | Computes the approximate distance between two points. |
| 78 | |
| 79 | The precision is what would be expected from doing the computation using 16 bit floating point values. |
| 80 | |
| 81 | See also @distance(), @native_distance(). |
| 82 | test: vector |
| 83 | end: |
| 84 | |
| 85 | function: fast_length |
| 86 | version: 17 |
| 87 | attrib: const |
| 88 | w: 1, 2, 3, 4 |
| 89 | t: f32 |
| 90 | ret: #2 |
| 91 | arg: #2#1 v |
| 92 | summary: Approximate length of a vector |
| 93 | description: |
| 94 | Computes the approximate length of a vector. |
| 95 | |
| 96 | The precision is what would be expected from doing the computation using 16 bit floating point values. |
| 97 | |
| 98 | See also @length(), @native_length(). |
| 99 | test: vector |
| 100 | end: |
| 101 | |
| 102 | function: fast_normalize |
| 103 | version: 17 |
| 104 | attrib: const |
| 105 | w: 1, 2, 3, 4 |
| 106 | t: f32 |
| 107 | ret: #2#1 |
| 108 | arg: #2#1 v |
| 109 | summary: Approximate normalized vector |
| 110 | description: |
| 111 | Approximately normalizes a vector. |
| 112 | |
| 113 | For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 114 | |
| 115 | The precision is what would be expected from doing the computation using 16 bit floating point values. |
| 116 | |
| 117 | See also @normalize(), @native_normalize(). |
| 118 | test: vector |
| 119 | end: |
| 120 | |
| 121 | function: length |
| 122 | version: 9 |
| 123 | attrib: const |
| 124 | w: 1, 2, 3, 4 |
| 125 | t: f32 |
| 126 | ret: #2 |
| 127 | arg: #2#1 v |
| 128 | summary: Length of a vector |
| 129 | description: |
| 130 | Computes the length of a vector. |
| 131 | |
| 132 | See also @fast_length(), @native_length(). |
| 133 | test: vector |
| 134 | end: |
| 135 | |
| 136 | function: native_distance |
| 137 | version: 21 |
| 138 | attrib: const |
| 139 | w: 1, 2, 3, 4 |
| 140 | t: f32 |
| 141 | ret: #2 |
| 142 | arg: #2#1 left_vector |
| 143 | arg: #2#1 right_vector |
| 144 | summary: Approximate distance between two points |
| 145 | description: |
| 146 | Computes the approximate distance between two points. |
| 147 | |
| 148 | See also @distance(), @fast_distance(). |
| 149 | test: vector |
| 150 | end: |
| 151 | |
| 152 | function: native_length |
| 153 | version: 21 |
| 154 | attrib: const |
| 155 | w: 1, 2, 3, 4 |
| 156 | t: f32 |
| 157 | ret: #2 |
| 158 | arg: #2#1 v |
| 159 | summary: Approximate length of a vector |
| 160 | description: |
| 161 | Compute the approximate length of a vector. |
| 162 | |
| 163 | See also @length(), @fast_length(). |
| 164 | test: vector |
| 165 | end: |
| 166 | |
| 167 | function: native_normalize |
| 168 | version: 21 |
| 169 | attrib: const |
| 170 | w: 1, 2, 3, 4 |
| 171 | t: f32 |
| 172 | ret: #2#1 |
| 173 | arg: #2#1 v |
| 174 | summary: Approximately normalize a vector |
| 175 | description: |
| 176 | Approximately normalizes a vector. |
| 177 | |
| 178 | See also @normalize(), @fast_normalize(). |
| 179 | test: vector |
| 180 | end: |
| 181 | |
| 182 | function: normalize |
| 183 | version: 9 |
| 184 | attrib: const |
| 185 | w: 1, 2, 3, 4 |
| 186 | t: f32 |
| 187 | ret: #2#1 |
| 188 | arg: #2#1 v |
| 189 | summary: Normalize a vector |
| 190 | description: |
| 191 | Normalize a vector. |
| 192 | |
| 193 | For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for positive values. |
| 194 | |
| 195 | See also @fast_normalize(), @native_normalize(). |
| 196 | test: vector |
| 197 | end: |