I have file
"1","x1897"," 89.10"
"1","x2232"," -12.12"
"1","x1897"," 389.10"
"1","x2232"," 212.12"
"1","x1897"," 19.10"
"1","x2232"," 2.12"
i want to add all 3 rd column rows (they have spaces also)for x1
and sum of 3rd column rows for x2 separately.
I am very... (8 Replies)
Hi All,
I have the following input which i want to process using AWK.
Rows,NC,amount
1,1202,0.192387
2,1201,0.111111
3,1201,0.123456
i want the following output
count of rows = 3 ,sum of amount = 0.426954
Many thanks (2 Replies)
Hello,
I have two files...
File #1
1 3
2 5
File #2
3 5 3
1 3 7
9 1 5
2 5 8
3 3 1
I need to extract all lines from File #2 where the first two columns match each line of File #1. So in the example, the output would be:
1 3 7
2 5 8
Is there a quick one-liner that would... (4 Replies)
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Hi all,
I have a large matrix of 720 x 25. I want to get sum of range of rows and columns. Like, I need sum of all columns and row number 2 to 21, then leaving 22nd row, again sum of all columns and row number 23 to 42 again leaving 43rd row and then sum of 44th to 63. Means I want to add all... (4 Replies)
Discussion started by: CAch
4 Replies
LEARN ABOUT CENTOS
persp_project_f
persp_project(3alleg4) Allegro manual persp_project(3alleg4)NAME
persp_project, persp_project_f - Projects a 3d point into 2d screen space. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void persp_project(fixed x, fixed y, fixed z, fixed *xout, fixed *yout);
void persp_project_f(float x, float y, float z, float *xout, float *yout);
DESCRIPTION
Projects the 3d point (x, y, z) into 2d screen space, storing the result in (*xout, *yout) and using the scaling parameters previously set
by calling set_projection_viewport(). This function projects from the normalized viewing pyramid, which has a camera at the origin and fac-
ing along the positive z axis. The x axis runs left/right, y runs up/down, and z increases with depth into the screen. The camera has a 90
degree field of view, ie. points on the planes x=z and -x=z will map onto the left and right edges of the screen, and the planes y=z and
-y=z map to the top and bottom of the screen. If you want a different field of view or camera location, you should transform all your
objects with an appropriate viewing matrix, eg. to get the effect of panning the camera 10 degrees to the left, rotate all your objects 10
degrees to the right.
SEE ALSO set_projection_viewport(3alleg4), get_camera_matrix(3alleg4), ex3d(3alleg4), exstars(3alleg4)Allegro version 4.4.2 persp_project(3alleg4)