Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
d0224e8b
Commit
d0224e8b
authored
Feb 15, 1998
by
Mirar (Pontus Hagland)
Browse files
Options
Downloads
Patches
Plain Diff
foo!
Rev: src/modules/Image/orient.c:1.3
parent
1829d1eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/Image/orient.c
+11
-11
11 additions, 11 deletions
src/modules/Image/orient.c
with
11 additions
and
11 deletions
src/modules/Image/orient.c
+
11
−
11
View file @
d0224e8b
/* $Id: orient.c,v 1.
2
1998/02/15 15:5
0:10 hedda
Exp $ */
/* $Id: orient.c,v 1.
3
1998/02/15 15:5
3:00 mirar
Exp $ */
/*
/*
**! module Image
**! module Image
**! note
**! note
**! $Id: orient.c,v 1.
2
1998/02/15 15:5
0:10 hedda
Exp $
**! $Id: orient.c,v 1.
3
1998/02/15 15:5
3:00 mirar
Exp $
**! class image
**! class image
*/
*/
...
@@ -36,7 +36,7 @@ extern struct program *image_program;
...
@@ -36,7 +36,7 @@ extern struct program *image_program;
#define testrange(x) MAXIMUM(MINIMUM((x),255),0)
#define testrange(x) MAXIMUM(MINIMUM((x),255),0)
static
const
double
c0
=
0
.
70710678118654752440
;
static
const
double
c0
=
0
.
70710678118654752440
;
static
const
double
PI
=
3
.
14159265358979323846
;
static
const
double
my_
PI
=
3
.
14159265358979323846
;
/*
/*
**! method object orient( foo bar args?)
**! method object orient( foo bar args?)
...
@@ -61,7 +61,7 @@ static const double PI=3.14159265358979323846;
...
@@ -61,7 +61,7 @@ static const double PI=3.14159265358979323846;
**! returns an array of four new image objects
**! returns an array of four new image objects
**! arg int newx
**! arg int newx
**! arg int newy
**! arg int newy
**! new image size in
pi
xels
**! new image size in
my_PI
xels
**!
**!
*/
*/
static
INLINE
int
sq
(
int
a
)
{
return
a
*
a
;
}
static
INLINE
int
sq
(
int
a
)
{
return
a
*
a
;
}
...
@@ -191,23 +191,23 @@ void image_orient(INT32 args)
...
@@ -191,23 +191,23 @@ void image_orient(INT32 args)
if
(
h
>
0
)
if
(
h
>
0
)
if
(
j
>
0
)
if
(
j
>
0
)
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
PI
))
*
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
my_
PI
))
*
atan
((
float
)
h
/
(
float
)
j
));
atan
((
float
)
h
/
(
float
)
j
));
else
else
if
(
j
<
0
)
if
(
j
<
0
)
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
PI
))
*
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
my_
PI
))
*
(
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
(
my_
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
else
else
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
255
/
4
;
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
255
/
4
;
else
else
if
(
h
<
0
)
if
(
h
<
0
)
if
(
j
>
0
)
if
(
j
>
0
)
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
PI
))
*
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
my_
PI
))
*
(
2
*
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
(
2
*
my_
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
else
else
if
(
j
<
0
)
if
(
j
<
0
)
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
PI
))
*
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
int
)(
0
.
5
+
(
255
/
(
2
*
my_
PI
))
*
(
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
(
my_
PI
+
atan
((
float
)
h
/
(
float
)
j
)));
else
else
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
3
*
255
)
/
4
;
A
->
img
[
x
+
y
*
B
->
xsize
].
r
=
(
3
*
255
)
/
4
;
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment